-
Notifications
You must be signed in to change notification settings - Fork 0
Fix Depot governance runs (packages token) #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,8 @@ jobs: | |
| # FIX 1 — token scoped to THIS STEP. At job level it was also in scope for the step that | ||
| # executes the downloaded package, and for anything else the job ever grows. | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| # Depot has no automatic GITHUB_TOKEN: use the imported packages token. | ||
| NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Fork pull request workflows do not receive repository secrets, so Assessment: 🟠 Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** .depot/workflows/governance-enforce.yml
**Line:** 59:59
**Comment:**
*Api Mismatch: Fork pull request workflows do not receive repository secrets, so `GH_PACKAGES_TOKEN` is empty and the private package install fails before governance enforcement runs.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix |
||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p "$RUNNER_TEMP/gov" && cd "$RUNNER_TEMP/gov" | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Edge Case: GH_PACKAGES_TOKEN must exist as a secret imported into Depot
This is the only reference to
GH_PACKAGES_TOKENanywhere in the repo, and Depot secret configuration lives outside this checkout (in Depot's project settings), so it can't be verified from the repo whether this secret is actually imported there. If it isn't configured, the step will still fail (empty token in.npmrc), reproducing the same E403 this PR is meant to fix — worth a quick confirmation in Depot's dashboard before merging, or a note in the PR description confirming it's already set up.Was this helpful? React with 👍 / 👎