From e3b0d9dec3a81964e0dbaca65754f582767b40fc Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Sun, 29 Mar 2026 18:01:26 -0600 Subject: [PATCH] fix: restore displaced TODO comment, add GHES edit relationship test - Restore // TODO projectsV1Deprecation comment above TestProjectsV1Deprecation (was displaced when new tests were inserted at that location) - Add 'relationships unsupported on GHES' test case to edit command using DisabledDetectorMock (parity with create's GHES tests) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkg/cmd/issue/create/create_test.go | 4 ++-- pkg/cmd/issue/edit/edit_test.go | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/issue/create/create_test.go b/pkg/cmd/issue/create/create_test.go index f2a335da9..cb25cf471 100644 --- a/pkg/cmd/issue/create/create_test.go +++ b/pkg/cmd/issue/create/create_test.go @@ -1260,8 +1260,6 @@ func TestIssueCreate_projectsV2(t *testing.T) { assert.Equal(t, "https://github.com/OWNER/REPO/issues/12\n", output.String()) } -// TODO projectsV1Deprecation -// Remove this test. func TestNewCmdCreate_issuesV2Flags(t *testing.T) { tests := []struct { name string @@ -1604,6 +1602,8 @@ func Test_createRun_issuesV2(t *testing.T) { } } +// TODO projectsV1Deprecation +// Remove this test. func TestProjectsV1Deprecation(t *testing.T) { t.Run("non-interactive submission", func(t *testing.T) { diff --git a/pkg/cmd/issue/edit/edit_test.go b/pkg/cmd/issue/edit/edit_test.go index b309011a4..9052826f2 100644 --- a/pkg/cmd/issue/edit/edit_test.go +++ b/pkg/cmd/issue/edit/edit_test.go @@ -1136,6 +1136,22 @@ func Test_editRun(t *testing.T) { }, stdout: "https://github.com/OWNER/REPO/issue/123\n", }, + { + name: "relationships unsupported on GHES", + input: &EditOptions{ + Detector: &fd.DisabledDetectorMock{}, + IssueNumbers: []int{123}, + Interactive: false, + AddBlockedBy: []string{"200"}, + FetchOptions: func(_ *api.Client, _ ghrepo.Interface, _ *prShared.Editable, _ gh.ProjectsV1Support) error { + return nil + }, + }, + httpStubs: func(t *testing.T, reg *httpmock.Registry) { + mockIssueGet(t, reg) + }, + wantErr: true, + }, { name: "batch edit type", input: &EditOptions{