Repository navigation
Keep a pull request's own card and milestone in step with its issues - #15
Merged
Merged
Conversation
The built-in workflows never move a pull request's card and never copy an issue's milestone onto the pull request that closes it, so a pull request sat in Backlog without a milestone while its issue moved to In review. The sync now gives a pull request the milestone its issues agree on, through the repository's own token passed as REPO_TOKEN, and moves the pull request's card by the rules the milestoned backfill uses.
This was referenced Oct 30, 2026
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.
GitHub's built-in project workflows move an issue when a pull request that closes it is opened or merged, but they never touch the pull request's own card, and they never copy the issue's milestone onto the pull request. So cdxgen/cdxgen#4686 sat in Backlog with no milestone while the issue it closes, cdxgen/cdxgen#4605, was already In review and aimed at 13.6.0.
The sync now does both on every pull request event:
milestoned, so a pull request goes on the board as soon as someone aims it at a release.The project token need not reach a repository, so the milestone is set with the repository's own token. The starter grants its job
pull-requests: writeand passesgithub.tokenas the new optionalREPO_TOKENsecret. The job still runs no code from the pull request. The reusable workflow's own permissions are unchanged, so a repository on an older copy of the starter keeps working and simply leaves milestones alone.node --test "project/test/*.test.mjs"passes, with 59 tests, 13 of them new, covering the milestone choice, the card rules and the token the milestone is written with. A dry run ofsync.mjsagainst the real cdxgen/cdxgen#4686 and the live board picked milestone 13.6.0 from cdxgen/cdxgen#4605 and left the pull request's card, already In review, alone.Each calling repository needs to update its copy of the starter to get the milestone part. cdxgen/cdxgen pins this repository by commit, so it needs a follow-up that moves the pin once this merges.