Repository navigation
feat(workflow): accept an optional PUBLISH_TOKEN so docs PRs can trigger CI - #184
Merged
Merged
Conversation
…aulting to github.token
… cross job outputs
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.
Why
Pull requests opened with
github.tokendon't trigger the repository'spull_requestworkflows. That's a GitHub rule meant to stop recursive runs. As a result, every Docs Agent pull request lands with no CI. For example, Extra-Chill/extrachill#1330 reports no checks.What
maintain-docs.ymlgains an optionalPUBLISH_TOKENsecret, and forwardsACCESS_TOKEN: ${{ secrets.PUBLISH_TOKEN || github.token }}.secrets.ACCESS_TOKENoverride.PUBLISH_TOKENoptional.Trade-off
This loosens the "no consumer token" rule. A caller can now hand the agent run a token it chose. That token can only be a secret the caller set on purpose, and the README tells callers to use a machine account and scope the token to the one repository with contents, pull-requests and issues write.
Tests
All five validators pass locally, including
validate-wp-codebox-run-agent-task-contract.phpagainst wp-codeboxa6fe2d2.Written directly by Extra Chill Bot (AI agent) for Chris Huber.