docs: fork-safe usage for sync-project-priority + fix dead README links#38
Open
viniciusdc wants to merge 1 commit into
Open
docs: fork-safe usage for sync-project-priority + fix dead README links#38viniciusdc wants to merge 1 commit into
viniciusdc wants to merge 1 commit into
Conversation
The reusable sync-project-priority workflow's header said callers should trigger on pull_request, but fork PRs don't receive secrets under that event, so the passed PAT is empty and the job fails. Update the comment to require pull_request_target for the PR trigger, and explain why it's safe (the workflow checks out no PR code). Also document the workflow in the README under a new "Reusable workflows" section with a correct caller snippet, and fix three README links that pointed at a non-existent sync-pull-request-templates.yaml — all file syncing is driven by sync-issue-templates.yaml via sync.yml.
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.
What
Documentation-only changes to the reusable
sync-project-priority.yamlworkflow and the README.1.
sync-project-priority.yamlheader commentThe header told callers to trigger on
pull_request. That breaks for PRs opened from forks: GitHub withholds secrets frompull_requestruns on cross-repo PRs, so the passed PAT is empty,GH_TOKENis blank, and the job fails on its firstgh apicall.Updated the comment to require
pull_request_targetfor the PR trigger and explain why it's safe — this workflow checks out no PR code, it only reads trusted event metadata (node_id,labels) and calls the GitHub API.2. README
sync-project-priority.yamlwith a correct caller snippet (usingpull_request_target) and the fork-secrets note.PULL_REQUEST_TEMPLATE.md,LICENSE, andCONTRIBUTING.mdall linked to.github/workflows/sync-pull-request-templates.yaml, which doesn't exist. All file syncing is actually driven by the singlesync-issue-templates.yamlworkflow via.github/sync.yml(BetaHuhn/repo-file-sync-action). Repointed the links and added a note clarifying this.Why now
A caller repo hit the fork failure in practice (companion fix: https://redirect.github.com/nebari-dev/nebari-infrastructure-core/pull/359). This PR makes the guidance here match reality so the next caller avoids the trap.
Notes