Fix ignoring ProjectsV2-specific errors for GHES

This commit is contained in:
Mislav Marohnić 2023-01-27 18:08:56 +01:00
parent bab1b00c39
commit d2f3e89ad3
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions

View file

@ -10,10 +10,10 @@ import (
const (
errorProjectsV2ReadScope = "field requires one of the following scopes: ['read:project']"
errorProjectsV2RepositoryField = "Field 'ProjectsV2' doesn't exist on type 'Repository'"
errorProjectsV2OrganizationField = "Field 'ProjectsV2' doesn't exist on type 'Organization'"
errorProjectsV2IssueField = "Field 'ProjectItems' doesn't exist on type 'Issue'"
errorProjectsV2PullRequestField = "Field 'ProjectItems' doesn't exist on type 'PullRequest'"
errorProjectsV2RepositoryField = "Field 'projectsV2' doesn't exist on type 'Repository'"
errorProjectsV2OrganizationField = "Field 'projectsV2' doesn't exist on type 'Organization'"
errorProjectsV2IssueField = "Field 'projectItems' doesn't exist on type 'Issue'"
errorProjectsV2PullRequestField = "Field 'projectItems' doesn't exist on type 'PullRequest'"
)
// UpdateProjectV2Items uses the addProjectV2ItemById and the deleteProjectV2Item mutations

View file

@ -221,22 +221,22 @@ func TestProjectsV2IgnorableError(t *testing.T) {
},
{
name: "repository projectsV2 field error",
errMsg: "Field 'ProjectsV2' doesn't exist on type 'Repository'",
errMsg: "Field 'projectsV2' doesn't exist on type 'Repository'",
expectOut: true,
},
{
name: "organization projectsV2 field error",
errMsg: "Field 'ProjectsV2' doesn't exist on type 'Organization'",
errMsg: "Field 'projectsV2' doesn't exist on type 'Organization'",
expectOut: true,
},
{
name: "issue projectItems field error",
errMsg: "Field 'ProjectItems' doesn't exist on type 'Issue'",
errMsg: "Field 'projectItems' doesn't exist on type 'Issue'",
expectOut: true,
},
{
name: "pullRequest projectItems field error",
errMsg: "Field 'ProjectItems' doesn't exist on type 'PullRequest'",
errMsg: "Field 'projectItems' doesn't exist on type 'PullRequest'",
expectOut: true,
},
{