Skip to content

fix: skip cross-repo closes refs in PR linked issues - #1020

Closed
aliangm wants to merge 1 commit into
entrius:testfrom
aliangm:fix/cross-repo-closes-issue-multiplier
Closed

fix: skip cross-repo closes refs in PR linked issues#1020
aliangm wants to merge 1 commit into
entrius:testfrom
aliangm:fix/cross-repo-closes-issue-multiplier

Conversation

@aliangm

@aliangm aliangm commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • GitHub computes authorAssociation against the issue's repo, so a closes ownerB/repoB#N link from a cross-repo issue could grant the 1.66× MAINTAINER_ISSUE_MULTIPLIER to a PR in repo A.
  • Add repository { nameWithOwner } to the closingIssuesReferences GraphQL fragment and drop nodes whose repo doesn't match the PR's repo at construction time.
  • Cached payloads without repository are passed through unchanged (backwards compat until refetch).

Test plan

  • pytest tests/test_classes.py — new tests for cross-repo skip (case-insensitive) and missing-repo backwards compat
  • Full suite (pytest tests/) — 764 passed

Fixes #1019

GitHub computes authorAssociation against the issue's repo, so a
`closes ownerB/repoB#N` link from a cross-repo issue could grant the
1.66x MAINTAINER_ISSUE_MULTIPLIER to a PR in repo A.

Add `repository { nameWithOwner }` to the closingIssuesReferences
GraphQL fragment and drop nodes whose repo doesn't match the PR's repo
at construction time. Cached payloads without `repository` are passed
through unchanged for backwards compat.
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 5, 2026
@anderdc

anderdc commented May 6, 2026

Copy link
Copy Markdown
Collaborator

CI has been failing for 12+ hours with no fix pushed. Closing.

@aliangm

aliangm commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

@anderdc Would you please reopen it? I will take it as a warning seriously

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] _calculate_issue_multiplier accepts cross-repo closes ownerB/repoB#N linked issues

2 participants