Repository navigation
feat: say which GitHub account each commit on a pull request landed under - #582
Merged
Merged
Conversation
…nder A project's gh account governs what lich asks gh; it has never governed the push, which still signs with the global user.email. So a pull request could be read by one account and its commits land under another, with no error anywhere, and the Version Control pane refused to compare the two because comparing the strings is a false-positive farm. The answer was already in the payload. gh pr view --json commits carries the account GitHub itself resolved each author email to, checked against the verified addresses of every account, so noreply forms, vanity domains and org aliases all resolve correctly. toCommits threw it away: folding the login into the git name made a commit GitHub could not attribute read exactly like one it could. Keep the two apart, carry the author email for the unattributed case, and compare each commit against the account that opened the pull request. The Commits tab names the account a commit landed under, marks one linked to no account, and heads the list with a line when they are not all the pull request author's, while the branch can still be fixed. Nothing reads before a push, where GitHub has resolved nothing yet: gh api user/emails would answer there, but it needs the user scope that gh's own login does not request, and its refusal is a 404 no different from any other not-found. Both limits are in docs/ceilings.md.
omartelo
force-pushed
the
feat/commit-authorship-on-pr
branch
from
September 10, 2026 18:22
ff973da to
b5f4d10
Compare
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.
Closes #576.
A project's gh account governs what lich asks gh. It has never governed the push, which still rides the remote's ssh key and signs with the global
user.email. A pull request could therefore be read by one account and its commits land under another, with no error anywhere, and the Version Control pane refused to say so because comparing the two strings is a false-positive farm.Which of the two routes, and why
The issue asked for both to be measured first.
gh api user/emailsis out. Measured against both authenticated accounts on this machine: gh's own login requestsgist, read:org, repoand nouserscope, so the call is refused. The refusal isHTTP 404 Not Found, indistinguishable from a genuine not-found by status alone. Only gh's stderr names the missing scope, and stderr never reaches lich's UI. The pane could not tell a refusal from a match, which is the question the issue raised.GitHub had already answered.
gh pr view --json commitsis a call lich already makes, and it carries the account GitHub resolved each commit's author email to, checked against the verified addresses of every account. Equality becomes set membership on GitHub's side, and it is exact. Measured ontorvalds/linux:astellman@stellman-greene.comandrewstellmanmic@digikod.netl0koddongli.zhang@oracle.comVanity domains, org aliases and noreply forms all resolve.
""is an answer too: the email belongs to no account.toCommitswas throwing that away.firstNonEmpty(Login, Name)folded the login into the git author name, so a commit GitHub could not attribute rendered exactly like one it could.What changed
PRCommitkeepsLogin,NameandEmailapart instead of collapsing them, andPRDetailgainsAuthorLogin(the author without the fallback to a display name, so a PR whose author gh reports without a login cannot read as every commit landing elsewhere).frontend/src/lib/pulls/commit-authors.tsbuilds the reading; the Commits tab renders it.Verified in the running app
Driven through a headless window against
cli/cli, all three states:1 commit is linked to no GitHub account: vilmibm@github.com.@williammartin committed 9/4/20263 commits landed under @Copilot, not @kilasuit.A false alarm found on the way and fixed: a web-flow merge commit carries no author at all, and was being counted as unattributed. Nobody's identity is wrong there, so it is left alone.
What this still does not cover
All three are written into
docs/ceilings.md.vcs.accountonly answers that when the project has named one.Test plan
gofmt -l .clean,go vet ./...cleango test ./...greencd frontend && pnpm testgreen (1764 tests)cd frontend && pnpm buildsucceedsTwo pre-existing problems found while running the gate
Neither is from this branch and neither is fixed here.
pnpm exec biome ci .exits 1 onmain— 17 a11y warnings plus oneassistinfo, and zero errors. Confirmed by running biome against a detached worktree ofHEAD: same exit. The local gate inCLAUDE.mdasks for exit 0, so it cannot pass as written.use-history-search.test.tsxon one failure anduse-closed-projects.test.tsxon another. Same jsdom starvation shape as the render-budget work: a different file each time, green alone and green on re-run.