Skip to content

prs: add Last Reviewer field - #27

Merged
katbyte merged 1 commit into
mainfrom
kt/last-reviewer
Sep 23, 2026
Merged

katbyte merged 1 commit into
mainfrom
kt/last-reviewer

Conversation

@katbyte

@katbyte katbyte commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Add a Last Reviewer text field to the board, the login of whoever left the most recent review on the PR.

Why: Reviewed At (#25) says when a PR was last looked at but not by whom. Together they answer "who has the ball" without opening the PR.

It records the author of the same review that stamps Reviewed At. Both sync paths already find the newest submitted review, in any state except a pending draft, so the reviewer is captured in that step. The two fields always describe one review.

 			if review.State != string(githubv4.PullRequestReviewStatePending) && review.SubmittedAt.After(pr.ReviewedAt) {
 				pr.ReviewedAt = review.SubmittedAt
+				pr.LastReviewer = review.Author.Login
 			}

Unset when there are no reviews. Same as Merged By: nothing is written for an unreviewed PR.

+	"Last Reviewer": {
+		Type: gh.ItemValueTypeText,
+		ComputeFn: func(ctx PRFieldContext) any {
+			if ctx.PR.LastReviewer == "" {
+				return nil // never reviewed
+			}
+			return ctx.PR.LastReviewer

Refresh updates it on open PRs too. It joins the refresh defaults and the --include-open safe list, since it needs only the review list refresh already fetches.

Things that are fine as they are. A board without a Last Reviewer field logs a warning and skips it, like any other missing field. Build, vet and lint pass; the repo has no tests.

@katbyte
katbyte merged commit f876340 into main Sep 23, 2026
10 checks passed
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.

1 participant