Skip to content

Fix false PR event warnings for issue number collisionsFix false PR event warnings when issue numbers overlap with PR numbers (#3762)#3805

Open
Noaman-Akhtar wants to merge 1 commit intoaugurlabs:mainfrom
Noaman-Akhtar:issue-3762
Open

Fix false PR event warnings for issue number collisionsFix false PR event warnings when issue numbers overlap with PR numbers (#3762)#3805
Noaman-Akhtar wants to merge 1 commit intoaugurlabs:mainfrom
Noaman-Akhtar:issue-3762

Conversation

@Noaman-Akhtar
Copy link
Copy Markdown
Contributor

Fixes #3762.

What changed

  • Updated BulkGithubEventCollection._process_pr_events in augur/tasks/github/events.py.
  • When related PR URL is missing from local PR map:
    • Parse PR number from URL
    • Check if that number exists in repo issues (gh_issue_number)
    • If yes, skip silently (expected due to shared GitHub issue/PR numbering)
    • If no, keep existing warning

Why

GitHub uses a shared namespace for issue and PR numbers. The old logic emitted noisy warnings for valid issue numbers that are not PRs.

Tests

Added tests/test_tasks/test_github_tasks/test_events.py:

  • skips warning when missing PR number matches existing issue number
  • still warns when PR number is missing from both PR and issue data

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

collect_events tries to collect PRs numbers that are assigned to issues

1 participant