Skip to content

Add regression test for required scopes parsing#12803

Open
gcomneno wants to merge 1 commit intocli:trunkfrom
gcomneno:contrib/issue-12585-regression-test
Open

Add regression test for required scopes parsing#12803
gcomneno wants to merge 1 commit intocli:trunkfrom
gcomneno:contrib/issue-12585-regression-test

Conversation

@gcomneno
Copy link

@gcomneno gcomneno commented Feb 28, 2026

Fixes #12585

What this PR does

Adds a regression test for requiredScopesFromServerMessage to cover the GraphQL error message reported in #12585 (addProjectV2ItemById -> ['project']).

Why

The current behavior depends on parsing the server error message text. This test locks in the expected scope extraction for this specific message so future refactors or upstream wording changes don't silently regress scope detection.

How to verify

go test -count=1 ./pkg/cmd/project/shared/queries -run Test_requiredScopesFromServerMessage

@gcomneno gcomneno requested a review from a team as a code owner February 28, 2026 09:41
@gcomneno gcomneno requested a review from BagToad February 28, 2026 09:41
@github-actions github-actions bot added unmet-requirements external pull request originating outside of the CLI core team labels Feb 28, 2026
@github-actions
Copy link

Thanks for your pull request! Unfortunately, it doesn't meet the minimum requirements for review:

  • None of the referenced issues have the help-wanted label

Please update your PR to address the above. Requirements:

  1. Include a detailed description of what this PR does
  2. Link to an issue with the help-wanted label (use Fixes #123 or Closes #123 if it resolves the issue)

This PR will be automatically closed in 7 days if these requirements are not met.

@github-actions github-actions bot added the needs-triage needs to be reviewed label Feb 28, 2026
@gcomneno
Copy link
Author

@BagToad Quick question: the review-bot still reports that none of the referenced issues have the help wanted label. Issue #12585 currently shows help wanted on my side (and that's what this regression test targets). Could you please add/confirm the exact label the bot expects (e.g. help-wanted vs help wanted) on #12585 so this PR meets the review requirements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team needs-triage needs to be reviewed unmet-requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing error message on scopes

1 participant