fix(ci): use PAT for sync-skills workflow so downstream workflows fire#394
Merged
matv-stripe merged 1 commit intostripe:mainfrom May 6, 2026
Merged
Conversation
Closes stripe#355 Per GitHub's docs on GITHUB_TOKEN, events triggered by GITHUB_TOKEN do not create new workflow runs. That means any downstream workflow configured to run on push or pull_request events is silently skipped when the sync-skills workflow creates a PR or commits. Switches the checkout and peter-evans/create-pull-request@v6 steps to use a SYNC_SKILLS_PAT secret, falling back to GITHUB_TOKEN when the secret is not configured so the workflow keeps working for forks / CI matrices that don't provision the PAT. To activate the fix, create a SYNC_SKILLS_PAT repo secret with a PAT that has `contents: write` and `pull-requests: write` on this repo.
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.
Closes #355
What
Switches the
sync-skillsworkflow to use a PAT for checkout and thepeter-evans/create-pull-request@v6step, falling back toGITHUB_TOKENwhen the secret is not set.Why
Per GitHub's docs, events produced by GITHUB_TOKEN pushes / PR creations do NOT trigger new workflow runs (exception:
workflow_dispatchandrepository_dispatch). Any workflow configured to run onpushorpull_requestis silently skipped when the sync bot creates the PR.The issue links the GitHub doc directly.
Activation
To make the fallback route to the real PAT path, create a repo secret:
SYNC_SKILLS_PATcontents: write,pull-requests: writeUntil the secret is created, the workflow still uses
GITHUB_TOKENand keeps working exactly as it does today - this PR does not regress anything.Scope
One-line logic change in
.github/workflows/sync-skills.yml, applied to both the checkout and the create-pull-request steps. No other workflow files touched. No secret added by the PR (that's a maintainer action).Verified
ruby -ryaml -e "YAML.load_file(...)").This contribution was developed with AI assistance (Claude Code).