Skip to content

docs: fork-safe usage for sync-project-priority + fix dead README links#38

Open
viniciusdc wants to merge 1 commit into
mainfrom
docs/sync-project-priority-fork-usage
Open

docs: fork-safe usage for sync-project-priority + fix dead README links#38
viniciusdc wants to merge 1 commit into
mainfrom
docs/sync-project-priority-fork-usage

Conversation

@viniciusdc

Copy link
Copy Markdown
Contributor

What

Documentation-only changes to the reusable sync-project-priority.yaml workflow and the README.

1. sync-project-priority.yaml header comment

The header told callers to trigger on pull_request. That breaks for PRs opened from forks: GitHub withholds secrets from pull_request runs on cross-repo PRs, so the passed PAT is empty, GH_TOKEN is blank, and the job fails on its first gh api call.

Updated the comment to require pull_request_target for 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

  • New "Reusable workflows" section documenting sync-project-priority.yaml with a correct caller snippet (using pull_request_target) and the fork-secrets note.
  • Fixed three dead links. The entries for PULL_REQUEST_TEMPLATE.md, LICENSE, and CONTRIBUTING.md all linked to .github/workflows/sync-pull-request-templates.yaml, which doesn't exist. All file syncing is actually driven by the single sync-issue-templates.yaml workflow 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

  • Prettier (the repo's pre-commit hook) normalized the YAML string quotes to double quotes; no behavior change.

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.
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