Repository navigation
feat: record every pull request review, not only approvals - #1270
Merged
Merged
Conversation
Policies could not see a change request given after an approval, because the CLI only sent approvals. Pull request attestations now carry a reviews list for every provider, with states mapped to APPROVED, CHANGES_REQUESTED, COMMENTED and, on GitHub, DISMISSED. - GitHub: every submitted review, with time and reviewed commit. - GitLab: approvals from approved_by, plus each reviewer's state. - Bitbucket: each participant's state and participated_on. - Azure: each reviewer's vote, leaving out groups. GitHub approvers now come from the same reviews, one per reviewer per commit, so approving the same commit twice no longer lists the reviewer twice. Approvals of different commits are both kept. Needs kosli-dev/server#7448 deployed first; the server drops unknown fields. Part of kosli-dev/server#7422. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Claude finished @AlexKantor87's task in 1m 43s —— View job PR review
I found no blocking issues. Both fixes from the earlier review are in 3d94964 and look right:
Findings (all minor)
What's good
|
omitempty dropped an empty reviews list as well as a nil one, so a PR with no reviews looked the same as one whose reviews were never read. An empty list is now sent as [], and only a nil one is left out. GitLab now matches approvers to reviewers on username rather than on the display name, which the two endpoints could format differently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AlexKantor87
marked this pull request as draft
October 15, 2026 14:42
AlexKantor87
marked this pull request as ready for review
October 16, 2026 06:47
AlexKantor87
enabled auto-merge (squash)
October 16, 2026 07:05
jbpros
disabled auto-merge
October 16, 2026 07:21
jbpros
approved these changes
Oct 16, 2026
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.
kosli attest pullrequestnow sends areviewslist holding every review, not only approvals. A policy can then see a change request given after an approval.Merge only after kosli-dev/server#7448 is in prod. Until then the server drops the field.
What each provider sends
approved_by.requested_changes→ CHANGES_REQUESTED,reviewed→ COMMENTED.unreviewed,review_started,unapprovednot sentapproved,changes_requested. No state but has commented → COMMENTEDSources: GitHub's GraphQL schema, GitLab's
MergeRequestReviewerState, Bitbucket's swaggerparticipant, Azure'sIdentityRefWithVote.Vote.Not a clean fit: GitHub DISMISSED is a fourth state, because GitHub overwrites what the dismissed review decided. GitLab
unapprovedis dropped. Azure folds 5 into 10 and -5 into -10.For policy authors
reviews: []means reviews were read and there were none. A missingreviewsmeans they weren't read (old CLI, or a GitLab without the reviewers endpoint).approversis unchanged (vote 10 only, groups in), so it can disagree withreviews.GitHub approvers now come from the reviews, one per reviewer per commit, so a repeat approval of the same commit is listed once.
Tested
Part of kosli-dev/server#7422
🤖 Generated with Claude Code