Skip to content

Show who approved each PR and flag human comments in /sessions - #254

Merged
haacked merged 1 commit into
mainfrom
haacked/sessions-approvers
Oct 23, 2026
Merged

haacked merged 1 commit into
mainfrom
haacked/sessions-approvers

Conversation

@haacked

@haacked haacked commented Oct 23, 2026

Copy link
Copy Markdown
Owner

/sessions shows an approved PR as "Approved" without saying who approved it, so a stamphog approval looks the same as a teammate's. It also gives no sign that a person left comments on an approved PR. Those comments need a read before the PR goes into the Trunk queue.

git pr --json now reports approvers and commenters. approvers comes from the reviews the lookup already fetches. commenters takes one more GraphQL call per open PR, because only GraphQL's author.__typename tells a bot from a person. It counts PR comments, reviews with a body, and comments in unresolved review threads. It leaves out bots, hidden comments, the PR author, and the signed-in user (cloud-agent PRs are opened by a bot, so the author alone would not leave out the user). When the lookup fails, or a PR has more comments than one page holds and none of the read ones came from a person, commenters is null and /sessions says the comments did not load instead of implying there are none.

/sessions writes "Approved by " in the PR cell and appends "comments from " when people commented. An approved, unqueued PR with human comments gets the next step "read the comments from , then enqueue". When the queue status did not load, the existing "check whether Trunk queued it" step still wins, since the PR may already be queued.

Test plan

https://claude.ai/code/session_01ANS6EqPtV7eQEUr6GHxanp

git pr --json reports approvers and commenters. commenters lists the
people, not bots, other than the PR author and the signed-in user whose
comments the PR still shows. /sessions names the approvers in the PR
cell and sends an approved PR with human comments to "read the comments,
then enqueue".

Claude-Session: https://claude.ai/code/session_01ANS6EqPtV7eQEUr6GHxanp
@haacked
haacked marked this pull request as ready for review October 23, 2026 23:29
@haacked
haacked merged commit bdfc94e into main Oct 23, 2026
1 check passed
@haacked
haacked deleted the haacked/sessions-approvers branch October 23, 2026 23:30
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