Skip to content

feat(ci): recognize cross-repository issue references in PR validation #1501

Description

@danielgap

🔍 Problem Description

The PR validation gates only recognize same-repository closing keywords. The pattern in .github/workflows/pr-check.yml (/(?:closes|fixes|resolves)\s+#(\d+)/gi) does not match the cross-repository form Closes OWNER/REPO#N, so a PR whose approved issue lives in a sibling repository fails Check Issue Reference with "no closing issue reference found" even though it links an approved issue.

Today this forced opening a mirror tracking issue in engram (PR #1500 ↔ #1499) for work that was already approved and claimed in Gentleman-Programming/gentle-ai#1019. The org already tracks twin issues across repos (for example #648 and gentle-ai#1019 describe the same defect), so cross-repo delivery is a recurring pattern, and every occurrence pays the mirror-issue cost: duplicated tracking, split discussion, and extra triage.

💡 Proposed Solution

Extend the recognized reference grammar to the cross-repository form (Closes/Fixes/Resolves OWNER/REPO#N) and have the approval check resolve the referenced issue through the REST API in its own repository before testing status:approved. A bare #N remains equivalent to OWNER/REPO#N for this repository. PRs could then link the repository where the work is actually approved, and mirror tracking issues become optional instead of structurally required.

📦 Affected Area

Other

🔄 Alternatives Considered

The current workaround is the mirror tracking issue (what PR #1500 does today): it keeps the gates green but duplicates tracking and discussion, and it only works after the mirror issue itself gets triaged and approved.

📎 Additional Context

Observed while opening #1500: Check Issue Reference passed only after adding a bare Closes #1499, while the cross-repository reference to gentle-ai#1019 (approved, priority:high) was not recognized. Prior art in the same check family: gentle-ai#1770 fixed a different parsing defect (HTML comments), so the reference parser has an established maintenance history.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions