Add GitHub profile integration for Developer Tools card - #80
Merged
Conversation
The Developer Tools -> Source Code reference was built from a username, which
GitHub lets an account change at any time, silently breaking the link. Address
the account by its numeric user ID instead and expose the resolved profile to
the frontend.
- GitHubProperties: app.github.user-id is the canonical identity of the
integration; app.github.login is kept only as a bootstrap value for legacy
setups and as a presentation fallback.
- GitHubProfileService: resolves GET /user/{id} and returns the login and
html_url GitHub currently reports, so a rename keeps the reference valid. A
username-only configuration is resolved once through GET /users/{login} and
addressed by the recovered ID from then on. Answers are cached (1h by
default); when GitHub is unreachable the last known profile - or the
configured login - is served flagged as stale. A numeric ID is never turned
into a guessed profile URL.
- GET /api/v1/github/profile returns userId, login, htmlUrl, avatarUrl, stale.
Refs #77
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADchmECT1CRCXjKbx8BACV
Qodana for JVM3 new problems were found
View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.3.2
with:
upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com
|
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.
Summary
Adds a new GitHub profile integration feature that allows the application to display a linked GitHub account in the Developer Tools screen. The integration resolves GitHub accounts by their stable numeric user ID rather than username, ensuring the reference remains valid even after username changes.
Key Changes
GitHubProfileService: New service that manages GitHub profile resolution with the following capabilities:
GitHubProperties: Configuration component supporting:
app.github.user-id: Stable numeric user ID (canonical identity)app.github.login: Legacy/bootstrap username for backward compatibilityapp.github.api-base-url: GitHub API endpoint (defaults to public API)app.github.token: Optional personal access token for higher rate limitsapp.github.cache-ttl-seconds: Profile cache duration (default 1 hour)app.github.timeout-ms: HTTP request timeout (default 5 seconds)GitHubController: REST endpoint (
GET /api/v1/github/profile) that:staleflag indicating whether the data is from cache/fallbackGitHubProfileResponse: DTO representing the resolved GitHub profile with schema documentation
Comprehensive test coverage:
Notable Implementation Details
RestClientfor GitHub API communication with configurable timeoutsResourceNotFoundExceptionwhen no account is configured,ServiceUnavailableExceptionwhen GitHub fails with no fallbackhttps://claude.ai/code/session_01ADchmECT1CRCXjKbx8BACV