Repository navigation
feat(cli): report a PR's state with quest status - #162
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`quest status <pr>` prints a pull request's head, draft and open state, failing and pending checks with requiredness, mergeability, auto-merge, merge-queue state, each reviewer's latest review marked current or stale, reactions, and unresolved review threads with node IDs, plain or --json, from one paged GraphQL query. Extract the GitHub client from `quest wait` into src/cli/github.ts so both commands share PR parsing, auth, rate-limit retry, and same-origin paging. Point the merge, iterate, and complete skills at it, and finish quest/m0/helpers/status.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Outcome: quest/m0/helpers/status.md is implemented and deleted in this PR. (Written by Claude Opus 5.5) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be1615b702
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const reviewer = actor(row.author); | ||
| const commit = row.commit === null ? null : string(object(row.commit).oid); | ||
| latest.delete(reviewer); |
There was a problem hiding this comment.
Preserve separate reviews from deleted accounts
When a PR contains reviews from multiple deleted accounts, GitHub returns null for each author, so actor(row.author) produces "-" for all of them and the reviewer-keyed map silently overwrites every review except the last. This violates the command's one-latest-review-per-reviewer contract and can hide a changes-requested review; use a review-specific fallback key when the author is unavailable rather than grouping all anonymous authors together.
Useful? React with 👍 / 👎.
|
Merge summary for
Enabling squash auto-merge on the current head. (Written by Claude Opus 5.5) |
…st status Move the checks query and the base branch's requirement reads onto the shared GitHub client from #162, and classify each check with quest status's classifyCheck so both commands agree on what passes. Address Codex's review of 3ee919d: - read every page of the branch's rules (per_page=100, following links) - treat a required-workflows rule as requiring checks, so optional checks are not promoted before the workflow's checks start - keep the app a required check is bound to, so another app's check of the same name does not count as the required one starting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Completes
quest/m0/helpers/status.md.Problem
Agents chained
gh api .../reviews|comments|reactionsandreviewThreadsGraphQL queries to read a PR's state, often right afterquest waitreturned (219 of 396 audited sessions).Behavior
quest status <pr>takes the same argument asquest wait(a GitHub PR URL, or a number in origin) and prints, plain or--json:mergeable,merge-state,review-decision-required/optional(fromisRequired(pullRequestNumber:)), result, details URL, and namecurrentorstaleagainst the headreacted:<content>asquest waitnames thempath:lineIt is one GraphQL query; long check, review, and thread lists page with
@includeso later pages fetch only the connections that still have more. A push between pages fails with "rerun" rather than mixing heads. It exits 0 for any PR state, 2 for invalid arguments, and 1 for other failures.Live output on kixelated/quest#128:
Shared GitHub client
As the epic plan asked, the first second GitHub caller extracts the client:
src/cli/github.tsnow holds PR-argument parsing, auth, the rate-limited request with same-origin pagination, GraphQL error handling, and the JSON helpers.quest waituses it unchanged in behavior.WaitInputErrorbecameGitHubInputError, andWaitDependenciesbecameGitHubDependencies. A deadline inside the client throwsGitHubDeadline, whichquest waitalready turns intoWaitTimeoutwith its resume cursor.Skills and docs
merge: read the PR's state withquest status <pr>, including after eachquest waitwakes, and confirm a dequeue or disabled auto-merge with it.iterate: namesquest statusfor checks, reviews by head, and unresolved threads.complete: confirms a dequeue or disabled auto-merge withquest status.ready: summarizes the reviews and CI fromquest status <pr>(user-approved addition).--help.src/cli/github.tsas the shared client.Decisions made without asking (routine; recommended option taken)
review-decisionis reported even though the decided list did not name it. It is GitHub's own value. Without it, an approval followed by a comment-only review would look likecommentedonly.commented. Pending reviews (the viewer's unsubmitted draft) are excluded. A deleted account groups as-.error/failurefail andpending/expectedare pending. Passing checks are counted but not listed.outdated.quest wait, and are not paged.Statustype.-. Reaction lines include their time.Validation
nix develop -c just check: passednix develop -c just test: passed (vitest 232 + Worker 249, shell hook suites, lifecycle checks on both builds)test/status.test.tsuses recorded responses for stale and current reviews, required and optional failing checks, commit statuses, a queued PR with auto-merge, resolved and unresolved threads, multi-connection pagination, a head change between pages, GraphQL errors, a missing PR, and a bad PR argument.Limitations and follow-ups
quest wait) insrc/cli/wait.ts,src/cli/main.ts, and themerge/completeskills. That PR should read checks throughGitHub.graphqlinsrc/cli/github.ts. It could also share check classification withstatus.ts, so the two commands agree on what passes.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code