Skip to content

ci: accept cross-repo issue references in the PR body check - #36

Merged
Bugs5382 merged 2 commits into
mainfrom
ci/5-cross-repo-issue-refs
Sep 30, 2026
Merged

Bugs5382 merged 2 commits into
mainfrom
ci/5-cross-repo-issue-refs

Conversation

@Bugs5382

@Bugs5382 Bugs5382 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The PR Body step in job-pr-checks.yaml only 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#12 or https://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

  • Lint clean
  • Tests pass
  • Documentation updated (if behavior or API changed)

How this was verified

The step's own script was read out of the workflow with yq and run against template bodies carrying each reference line below. On main, 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).

Reference line Expected
Closes #12, closes #12, Fixes #12, Resolves #12, Refs #12, REFS #12 pass
Closes: #12 pass
Refs CryptOS-PKI/cryptos#278 pass
refs cryptos-pki/cryptos#278 pass
Fixes CryptOS-PKI/.github#5 pass
Closes CryptOS-PKI/docs#15. pass
Resolves GH-26 pass
Closes https://github.com/CryptOS-PKI/cryptos/issues/278 pass
- Refs CryptOS-PKI/cryptos#166, closes #3 pass
No issue for this one. fail
https://github.com/CryptOS-PKI/cryptos/issues/278 (bare URL, no keyword) fail
See #12 fail
ref #12, Ref #12 (typo) fail
Refs # fail
Refs#12 fail
Refs cryptos#278 (no owner) fail
Refs https://example.com/page#12 fail
Refs owner/repo/#12 fail
Closes #12abc fail
prefixes #12 fail
Closes #12 with no "What and why" section fail
  • The real bodies of api#108 and docs#15 pass the new step.
  • actionlint (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.)

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

Copy link
Copy Markdown
Contributor Author

Closing summary: the PR-body check now also accepts cross-repo references (owner/repo#N). Tracked in CryptOS-PKI/.github#5.

@Bugs5382
Bugs5382 merged commit 9a53f1f into main Sep 30, 2026
7 checks passed
@Bugs5382
Bugs5382 deleted the ci/5-cross-repo-issue-refs branch September 30, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Excluded from release notes (chore/ci/test/style).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant