Skip to content

fix: pass GITHUB_TOKEN to checkout in node-pr workflow#121

Closed
hubertott wants to merge 1 commit intomainfrom
fix/allow-caller-to-pass-in-github-token-node-pr
Closed

fix: pass GITHUB_TOKEN to checkout in node-pr workflow#121
hubertott wants to merge 1 commit intomainfrom
fix/allow-caller-to-pass-in-github-token-node-pr

Conversation

@hubertott
Copy link
Copy Markdown
Contributor

Description of the proposed changes
Both "Fetch all commits for Nx" steps in the build and test jobs now have token: ${{ secrets.GITHUB_TOKEN }}. This provides authentication for the full-history fetch while persist-credentials: false still ensures the token isn't left in the git config after the step completes.

Screenshots (if applicable)
External Organisation Error Example
Screenshot 2026-03-31 at 3 35 57 pm

Other solutions considered (if any)

Notes to PR author

⚠️ Please make sure the changes adhere to the guidelines mentioned in our contribution guide.

Notes to reviewers

Only edge case:
a caller that explicitly sets permissions: {} (stripping all token scopes) — but that would already break the initial actions/checkout step at the top of the job, so it's not a new regression from this change.

ℹ️ When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback

Explicitly passing the GITHUB_TOKEN to the checkout action ensures that it has the necessary permissions for subsequent git operations, such as fetching the full history when persist-credentials is set to false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant