Skip to content

chore(workflow): add readiness audit to pr-watch.py (PP-watch)#1287

Open
timothyfroehlich wants to merge 4 commits intomainfrom
feat/pr-watch-readiness-audit-PP-watch
Open

chore(workflow): add readiness audit to pr-watch.py (PP-watch)#1287
timothyfroehlich wants to merge 4 commits intomainfrom
feat/pr-watch-readiness-audit-PP-watch

Conversation

@timothyfroehlich
Copy link
Copy Markdown
Owner

Adds a pre-flight audit to pr-watch.py that blocks if the PR is behind 'main' or has unresolved Copilot comments. This prevents 'piling up' of comments by ensuring agents address existing feedback and merge main before entering the wait-for-review state.

Changes

  • Readiness Audit: Checks behind_by via GitHub Compare API and unresolved Copilot threads via GraphQL before starting the watch loop.
  • Fail-Fast: Exits with Status 1 and clear instructions if blockers are found.
  • Force Flag: Adds --force to bypass checks when necessary.

Verified locally against PR #1270.

Adds a pre-flight audit to `pr-watch.py` that blocks if the PR is behind 'main'
or has unresolved Copilot comments. This prevents 'piling up' of comments
by ensuring agents address existing feedback and merge main before entering
 the wait-for-review state.

- Checks `behind_by` via GitHub Compare API (more robust than mergeStateStatus)
- Checks unresolved Copilot threads via GraphQL
- Adds `--force` flag to bypass checks when needed
Copilot AI review requested due to automatic review settings May 5, 2026 03:31
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pin-point Ready Ready Preview, Comment May 5, 2026 8:37pm

@supabase
Copy link
Copy Markdown

supabase Bot commented May 5, 2026

This pull request has been ignored for the connected project udhesuizjsgxfeotqybn due to reaching the limit of concurrent preview branches.
Go to Project Integrations Settings ↗︎ if you wish to update this limit.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds a pre-flight readiness audit to pr-watch.py so the watcher can fail early when a PR should not enter the review-wait loop yet.

Changes:

  • Adds CLI support for an optional --force flag and updates argument parsing.
  • Fetches additional PR metadata, then performs a readiness audit before the watch loop starts.
  • Blocks watching when the PR is behind main or has unresolved Copilot review threads, unless --force is used.

Comment thread scripts/workflow/pr-watch.py Outdated
Comment thread scripts/workflow/pr-watch.py Outdated
Comment thread scripts/workflow/pr-watch.py Outdated
Comment thread scripts/workflow/pr-watch.py Outdated
Comment thread scripts/workflow/pr-watch.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread scripts/workflow/pr-watch.py Outdated
- pr-watch.py now paginates the reviewThreads GraphQL query via
  pageInfo.hasNextPage cursor, so PRs with >100 review threads are
  audited completely. Previously the readiness audit only inspected the
  first 100 threads, silently missing unresolved Copilot feedback on
  large PRs (e.g. #1270 has 33 active threads, more accumulate over
  time).
- Fixes ruff F541 (extraneous f-prefix) errors that broke Fast Linters
  on the prior commit.

Addresses GitHub Copilot review comments on PR #1287.
@timothyfroehlich timothyfroehlich added the ready-for-review PR passed CI and has no unresolved review comments label May 5, 2026
Copilot AI review requested due to automatic review settings May 5, 2026 20:22
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread scripts/workflow/pr-watch.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review PR passed CI and has no unresolved review comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants