Repository navigation
ci: accept cross-repo issue references in the PR body check - #36
Merged
Merged
Conversation
The PR Body check only matched a same-repo '#N' after closes, fixes, resolves or refs, so a PR tracked by another repo's issue failed even though GitHub links the reference. It now accepts GitHub's closing keywords plus Refs, in any casing and with an optional colon, followed by #N, GH-N, owner/repo#N or a github.com issue URL. Word boundaries keep it strict: repo#N without an owner, fragments on other sites and keywords glued to other text do not count. Refs CryptOS-PKI/.github#5 Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Bugs5382
marked this pull request as ready for review
September 30, 2026 03:10
This was referenced Sep 30, 2026
Contributor
Author
|
Closing summary: the PR-body check now also accepts cross-repo references (owner/repo#N). Tracked in CryptOS-PKI/.github#5. |
10 tasks
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.
What and why
The PR Body step in
job-pr-checks.yamlonly matched a same-repo reference,(closes|fixes|resolves|refs) #[0-9]+. A PR whose work is tracked by another repo's issue failed the check even though GitHub links the reference. CryptOS-PKI/api#108 (Refs CryptOS-PKI/cryptos#278) and #15 (Refs CryptOS-PKI/cryptos#166) are blocked by it today.The step now accepts GitHub's closing keywords (close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved) plus
Refs, in any casing, with an optional colon, followed by a reference GitHub links:#12,GH-12,owner/repo#12orhttps://github.com/owner/repo/issues/12. Word boundaries keep it strict. The "What and why" section check is unchanged.Only the PR Body step changes; the rest of the workflow file is byte-identical to
main. The step's text matches the one the shared governance template already ships (Bugs5382/project-template#124), and the same change goes to cryptos, api, manager, web, helm and docs in one PR each.No docs change.
Refs CryptOS-PKI/.github#5
Verification
How this was verified
The step's own script was read out of the workflow with
yqand run against template bodies carrying each reference line below. Onmain, 9 of the 27 cases fail; with this change all 27 pass (checked with both BSD grep and ugrep; this PR's own run exercises GNU grep on the runner).Closes #12,closes #12,Fixes #12,Resolves #12,Refs #12,REFS #12Closes: #12Refs CryptOS-PKI/cryptos#278refs cryptos-pki/cryptos#278Fixes CryptOS-PKI/.github#5Closes CryptOS-PKI/docs#15.Resolves GH-26Closes https://github.com/CryptOS-PKI/cryptos/issues/278- Refs CryptOS-PKI/cryptos#166, closes #3No issue for this one.https://github.com/CryptOS-PKI/cryptos/issues/278(bare URL, no keyword)See #12ref #12,Ref #12(typo)Refs #Refs#12Refs cryptos#278(no owner)Refs https://example.com/page#12Refs owner/repo/#12Closes #12abcprefixes #12Closes #12with no "What and why" sectionactionlint(with shellcheck) on the changed workflow: clean.Before merging: add a closing comment summarizing what was actually done in this PR
(not just the checked boxes).
(Re-run after docs#42 scoped the secret scan.)