Skip to content

GitLab: show your own picture even for commits GitLab doesn't know (1.1.3) - #3

Merged
edoardopanichi merged 1 commit into
mainfrom
bugfix/gitlab-own-avatar
Nov 27, 2026
Merged

edoardopanichi merged 1 commit into
mainfrom
bugfix/gitlab-own-avatar

Conversation

@edoardopanichi

Copy link
Copy Markdown
Owner

With 1.1.2, every GitLab author showed a picture except the token owner.

Cause

  • GitLab answered correctly for the owner's pushed commits.
  • But the commit chosen locally was one GitLab couldn't name. Your own work is the most likely to be unpushed.
  • The fallback lookup only matches a public email, which isn't set.

Fix

  • The token owner's verified emails and picture come from /api/v4/user and /api/v4/user/emails, asked once per run. No commit lookup is needed for them.
  • A 401 from those requests drops the token, like the other lookups.
  • LOOKUP_VERSION is now 4, so the "no picture" cached by 1.1.2 is asked again.
  • Version 1.1.3, with README, TESTING.md and tests updated.

Tests

  • 103 passed, 2 skipped.
  • Live check with an unknown commit id: own picture found in 1.6 s.

🤖 Generated with Claude Code

- The token owner's verified emails and avatar come from /api/v4/user and /api/v4/user/emails (once per run); commits with any of those emails get that picture, no commit lookup needed
- A 401 there drops the token like the other lookups
- LOOKUP_VERSION 4: the "no picture" cached for your email by 1.1.2 is asked again
- Version 1.1.3; README and TESTING.md updated; tests for the owner lookup and the tokenless case

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@edoardopanichi
edoardopanichi merged commit 02bb340 into main Nov 27, 2026
5 checks passed
@edoardopanichi
edoardopanichi deleted the bugfix/gitlab-own-avatar branch November 28, 2026 18:45
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