Skip to content

fix: ignore outdated Copilot review threads in PR readiness check#780

Merged
diberry merged 3 commits intodevfrom
squad/fix-outdated-thread-check
Apr 4, 2026
Merged

fix: ignore outdated Copilot review threads in PR readiness check#780
diberry merged 3 commits intodevfrom
squad/fix-outdated-thread-check

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Apr 3, 2026

Outdated threads (where the code was changed by a subsequent push) were incorrectly counted as unresolved, blocking merge even after the issues were addressed.

Changes:

  • Added \isOutdated\ to the GraphQL reviewThreads query
  • Updated \checkCopilotThreads\ filter to exclude outdated threads
  • Success message now notes skipped outdated threads

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Copilot AI review requested due to automatic review settings April 3, 2026 14:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🛫 PR Readiness Check

⚠️ 3 item(s) to address before review

Status Check Details
Single commit 3 commits — consider squashing before review
Not in draft Ready for review
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present No source files changed — changeset not required
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved All 2 Copilot thread(s) resolved
CI passing 11 check(s) still running

This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the PR readiness script to avoid blocking merges due to outdated Copilot review threads (threads invalidated by subsequent pushes), by fetching isOutdated from GitHub GraphQL and excluding those threads from the “unresolved Copilot threads” calculation.

Changes:

  • Extend the GraphQL reviewThreads query to include isOutdated.
  • Update checkCopilotThreads to ignore outdated threads when determining unresolved Copilot threads.
  • Update the success detail message to indicate how many outdated threads were skipped.

@diberry diberry closed this Apr 3, 2026
@diberry diberry reopened this Apr 3, 2026
@diberry diberry force-pushed the squad/fix-outdated-thread-check branch 2 times, most recently from f764dee to 640a579 Compare April 3, 2026 14:57
- Add isOutdated to GraphQL reviewThreads query
- Filter out outdated threads when computing unresolved count
- Improve success message to distinguish resolved vs outdated threads
- Add test cases for outdated thread filtering (74 tests pass)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/fix-outdated-thread-check branch from 640a579 to d721b20 Compare April 3, 2026 20:47
Copy link
Copy Markdown
Collaborator

@tamirdresher tamirdresher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Targeted fix — only active unresolved threads block, outdated ones are correctly excluded. 3 good test cases.

@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Apr 4, 2026

Files in this PR:

  • scripts/pr-readiness.mjs
  • test/pr-readiness.test.ts

@diberry diberry merged commit 1feaaba into dev Apr 4, 2026
16 checks passed
@diberry diberry deleted the squad/fix-outdated-thread-check branch April 4, 2026 14:14
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.

3 participants