ci: support cross-repo and private issue references in link-issue workflow#36458
ci: support cross-repo and private issue references in link-issue workflow#36458mbiuki wants to merge 4 commits into
Conversation
The link-issue check previously only accepted same-repo `#NUMBER` references, causing PRs that track work in private repos (e.g. `dotCMS/private-issues#642`) to fail even with a valid issue link. Changes: - Detect `owner/repo#NUMBER` and full GitHub URL formats in PR body, in addition to same-repo `#NUMBER`, using closing keywords (closes/fixes/resolves and variants) - Emit `is_cross_repo` and `cross_repo_owner_repo` outputs that flow through all downstream steps - Team-label validation: for cross-repo issues, attempt to fetch labels and warn on access failure (private repos) rather than failing — same-repo validation is unchanged - Skip same-repo-only side effects when `is_cross_repo=true`: posting a PR-list comment on the issue, and appending a bare `#N` to the PR body (which would create a broken same-repo link) - Update failure comment to document cross-repo reference formats Closes dotCMS/private-issues#642 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JHg1W7beD4Z1yLoTJpyXss
|
Claude finished @mbiuki's task in 3m 12s —— View job Review: cross-repo & private issue referencesI reviewed the full diff against New Issues
Resolved
Notes (non-blocking, verified OK)
No blocking issues. The two previously-flagged concerns are genuinely resolved. · branch |
|
Hey @nollymar — since you introduced and hardened this workflow (dc5ec7d), tagging you for review on this one. The fix adds support for cross-repo issue references ( |
… workflow - Move same-repo `#N` check before cross-repo patterns so an explicit `Fixes #123` is never shadowed by a stray `word/word#N` elsewhere in the body - After extracting owner/repo from a cross-repo match, compare case-insensitively to `$GITHUB_REPOSITORY`; route as same-repo when they match, so `Fixes #123` doesn't skip same-repo side effects on its own repo Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JHg1W7beD4Z1yLoTJpyXss
|
@nollymar The two issues flagged in the AI review are now fixed (commit 642ca0c). When you get a chance, could you take another look? Summary of what changed:
Thanks! |
Summary
issue_comp_link-issue-to-pr.ymlto acceptowner/repo#NUMBERand full GitHub URL formats alongside the existing same-repo#NUMBERdetectionCloses dotCMS/private-issues#642) now pass the check without requiring a public placeholder issue#Nappended to PR body) are skipped for cross-repo references to avoid creating broken linksTest plan
Fixes dotCMS/private-issues#Npasseslink-issuecheckCloses https://github.com/dotCMS/private-issues/issues/Npasseslink-issuecheckFixes #N(same-repo) continues to pass and still gets the PR-list comment on the linked issueReferences
Closes #36457
🤖 Generated with Claude Code