chore: improve issue and PR search accuracy#15356
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the accuracy of issue and PR searches in the bot-detection workflow by splitting a single search query into two separate queries with explicit type qualifiers, and adding deduplication logic.
Changes:
- Split the GitHub Search API call into two separate queries: one for issues (with
is:issue) and one for PRs (withis:pull-request) - Added deduplication logic using a Set to track seen URLs and filter out any potential duplicates
- Updated both the source workflow (.md) and compiled workflow (.lock.yml) consistently
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/bot-detection.md | Split search into separate is:issue and is:pull-request queries, added deduplication filter |
| .github/workflows/bot-detection.lock.yml | Compiled version of bot-detection.md with updated frontmatter hash |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| sort: "updated", | ||
| order: "desc", | ||
| }); | ||
| // Search issues + PRs updated in window (API requires is:issue or is:pull-request) |
There was a problem hiding this comment.
The comment states "API requires is:issue or is:pull-request" but the GitHub Search API doesn't technically require these qualifiers - it will return both issues and PRs without them. Consider updating the comment to be more accurate, such as "Split into separate queries with is:issue and is:pull-request for better search accuracy" to better reflect the intent of the change.
| // Search issues + PRs updated in window (API requires is:issue or is:pull-request) | |
| // Search issues + PRs updated in window (split into is:issue and is:pull-request for better search accuracy) |
| sort: "updated", | ||
| order: "desc", | ||
| }); | ||
| // Search issues + PRs updated in window (API requires is:issue or is:pull-request) |
There was a problem hiding this comment.
The comment states "API requires is:issue or is:pull-request" but the GitHub Search API doesn't technically require these qualifiers - it will return both issues and PRs without them. Consider updating the comment to be more accurate, such as "Split into separate queries with is:issue and is:pull-request for better search accuracy" to better reflect the intent of the change.
| // Search issues + PRs updated in window (API requires is:issue or is:pull-request) | |
| // Search issues + PRs updated in window (split into separate queries with is:issue and is:pull-request for better search accuracy) |
Uh oh!
There was an error while loading. Please reload this page.