Skip to content

Commit 4b04c83

Browse files
TMHSDigitalclaude
andcommitted
ci(sync): open registry-sync PRs with a token that triggers checks
sync.yml passes secrets.SYNC_PR_TOKEN (falling back to github.token) to create-pull-request, because PRs created with the default GITHUB_TOKEN never start pull_request workflows and so could never satisfy the required checks. Commits are signed off for DCO. The workflows README documents the secret and the close/reopen fallback, and the PR body lists everything the sync now regenerates. Closes #120 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
1 parent d43c9f6 commit 4b04c83

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎.github/workflows/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,4 @@ When a third-party action releases a new version:
119119
- `release-drafter/release-drafter` in `release-drafter.yml` is SHA-pinned (v7.10.0). It runs under `pull_request_target` but never checks out PR code. Dependabot proposes SHA bumps.
120120
- Both conventions above are enforced by `tests/test_workflow_hygiene.py` (workflows) and `tests/test_composite_action_shape.py` (composite actions).
121121
- `peter-evans/create-pull-request` in `sync.yml` is SHA-pinned. Update as releases land.
122+
- `sync.yml` opens its PR with `secrets.SYNC_PR_TOKEN` when set. GitHub does not start `pull_request` workflows for PRs created with the default `GITHUB_TOKEN`, so without that secret the required checks never run on the sync PR. Fallback: close and reopen the PR (or push an empty commit to `chore/registry-sync`) to trigger them. To enable, add a fine-grained PAT scoped to this repo with Contents and Pull requests read/write as the `SYNC_PR_TOKEN` Actions secret.

‎.github/workflows/sync.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ jobs:
4343
if: steps.drift.outputs.changed == 'true'
4444
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
4545
with:
46+
# PRs opened with the default GITHUB_TOKEN do not trigger
47+
# pull_request workflows, so the required checks would never run.
48+
# SYNC_PR_TOKEN (a fine-grained PAT or GitHub App token with
49+
# contents and pull-requests write) avoids that. Without it the
50+
# PR still opens; close and reopen it to start the checks.
51+
token: ${{ secrets.SYNC_PR_TOKEN || github.token }}
52+
signoff: true
4653
branch: chore/registry-sync
4754
delete-branch: true
4855
commit-message: "chore: sync derived artifacts from registry"
@@ -53,7 +60,8 @@ jobs:
5360
Regenerated:
5461
- `README.md` tools table, descriptions, and stats
5562
- `CLAUDE.md` cataloged tools table and totals
56-
- `docs/index.html` embedded registry block
63+
- `docs/index.html` embedded registry, cards, filters, and stats
64+
- `docs/search-index.json`, `docs/sitemap.xml`, `docs/robots.txt`
5765
5866
Review the diff for accuracy. About section on GitHub is not updated by this workflow; the maintainer runs `python scripts/sync_from_registry.py --about` locally and pipes to `gh repo edit`.
5967
labels: registry,automated

0 commit comments

Comments
 (0)