Repository navigation
Link reviews and sessions both ways; show a run's CI checks and review verdict - #546
Merged
Merged
Conversation
…w verdict A review record now keeps the review job (session) that wrote it, and the session keeps the review it wrote. The reviewer API returns them as session_id on a review and review_sk on a session; older records show null. The run API gains checks (the CI checks on the open pull request's head, read from GitHub through short caches) and pr_review (CoderHelm's latest verdict on the run's pull request). Both are null when there is nothing to show, and never fail the run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four optional fields the dashboard's review and run pages need. All are additive; older records return null.
Changes
/api/reviewer/review,/api/reviewer/reviews):session_id: string | null, the review job that wrote that exact review. The worker now writes it on the review record (only when the job opened its session page)./api/reviewer/session):review_sk: string | null, the review record the session wrote. A verdict always sets it; a question answer sets it only when the job wrote no review first./api/runs/{run_id}):checks: { sha, items: [{ name, state, conclusion, required, started_at, completed_at, url }], counts: { passed, failed, running, queued, skipped } } | nullfor the head of the run's open pull request. Read from GitHub check runs and commit statuses with the installation token, on read, through in-memory caches: pull request head 30s, checks 45s keyed by repo and sha, required checks 10 min, token 45 min. A refused read is cached too, so a rate-limited install isn't asked again on each poll. Required checks come from branch rules and classic protection when readable, elserequiredstays false; a required check that hasn't reported shows asqueued. Whole read is capped at 6s; any failure gives null, never an error./api/runs/{run_id}):pr_review: { verdict, review_sk, session_id, reviewed_sha, at } | null, the latest APPROVE or REQUEST_CHANGES on the run's pull request from the team's review records (answers and old error reviews skipped).docs/api/openapi.jsonregenerated.Verification
cargo fmt --all,cargo clippy -p common -p gateway -p worker --all-targets -- -D warningsclean.cargo test -p common -p gateway -p worker: common 1636, gateway 806, worker 1426 (+2 in a separate target), all passing.session_idandreview_skfrom record to API JSON.