fix(ci): use GH_PROJECT_TOKEN for Projects V2 access in squad-mark-released#257
Merged
Merged
Conversation
…-mark-released GITHUB_TOKEN cannot access GitHub Projects V2 via GraphQL mutations. Switch to GH_PROJECT_TOKEN (PAT with project scope) which is already used by other project-board workflows in this repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the squad-mark-released GitHub Actions workflow to authenticate GraphQL Projects V2 mutations using a PAT (secrets.GH_PROJECT_TOKEN) instead of secrets.GITHUB_TOKEN, addressing “Resource not accessible by integration” failures when moving project items from Done → Released.
Changes:
- Switch
actions/github-scriptauthentication fromsecrets.GITHUB_TOKENtosecrets.GH_PROJECT_TOKENin thesquad-mark-releasedworkflow.
Comment on lines
25
to
28
| uses: actions/github-script@v9 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| github-token: ${{ secrets.GH_PROJECT_TOKEN }} | ||
| script: | |
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #257 +/- ##
=======================================
Coverage 84.48% 84.48%
=======================================
Files 44 44
Lines 851 851
Branches 114 114
=======================================
Hits 719 719
Misses 88 88
Partials 44 44 🚀 New features to boost your workflow:
|
…rk-released-token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
squad-mark-releasedworkflow which was failing with:Root Cause
GITHUB_TOKENcannot access GitHub Projects V2 via GraphQL mutations. This is a known GitHub limitation — Projects V2 mutations require a PAT withprojectscope.Fix
Swap
secrets.GITHUB_TOKEN→secrets.GH_PROJECT_TOKEN, which is the PAT already used byproject-board-automation.ymlandadd-issues-to-project.ymlfor Projects V2 access.Board Update
The v1.4.0 board update was performed manually — 22 items moved from Done → Released directly via GraphQL.
Related
squad-mark-releasedauto-trigger failure for v1.4.0