Skip to content

ci(docs-dispatch): authenticate as the dispatchbot GitHub App - #11

Merged
vdavez merged 2 commits into
mainfrom
ci/docs-dispatch-app-auth
Oct 19, 2026
Merged

vdavez merged 2 commits into
mainfrom
ci/docs-dispatch-app-auth

Conversation

@makegov-mark

@makegov-mark makegov-mark Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Switches .github/workflows/docs-dispatch.yml from the retired DOCS_DISPATCH_TOKEN PAT to the makegov-dispatchbot GitHub App.

  • A new actions/create-github-app-token@v3 step mints an installation token from the DISPATCHBOT_APP_ID / DISPATCHBOT_PRIVATE_KEY org secrets, scoped to the one repo the dispatch hits, and runs under the same condition as the dispatch step.
  • A small resolve step derives that repo from DOCS_TARGET_REPO (default makegov/docs), so the token scope and the dispatch target cannot drift apart when the variable overrides the target.
  • The dispatch step reads GH_TOKEN from that step's output through env:.
  • The header's "Required secrets" comment names the two org secrets. Change detection is untouched.

Testing

  • actionlint reports only the existing SC2063 note on the grep -qx '0*' all-zeros check, which is intended.
  • A manual workflow_dispatch run on this branch, which always dispatches, mints the token and sends the dispatch end to end.
  • The workflow matches the other SDK repos' copy apart from its header comment and checkout version.

Notes

CI-only change with no effect on the published package, so no changelog entry. [skip changelog]

🤖 Generated with Claude Code

vdavez and others added 2 commits October 19, 2026 15:17
The DOCS_DISPATCH_TOKEN PAT is retired. Each dispatch now mints a short-lived installation token from the DISPATCHBOT_APP_ID / DISPATCHBOT_PRIVATE_KEY org secrets, scoped to its one target repo, gated on the same condition as the dispatch it feeds. Change detection is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The token was hardcoded to the default composer repo, so a target-repo variable override would dispatch with a token that cannot reach it. A resolve step now derives owner and repo from the same target the dispatch uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vdavez
vdavez marked this pull request as ready for review October 19, 2026 20:36
@vdavez
vdavez merged commit 3c8fb69 into main Oct 19, 2026
10 of 12 checks passed
@vdavez
vdavez deleted the ci/docs-dispatch-app-auth branch October 19, 2026 20:48
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