Drop client-side feature detection for issue relationships
Let the API return its own "unsupported" error rather than gating the relationship mutations behind a client-side IssueRelationships check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
8f9069b275
commit
315dafbf74
4 changed files with 4 additions and 83 deletions
|
|
@ -1227,22 +1227,6 @@ 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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue