Add GitHub App credentials configuration via admin UI#328
Open
manana2520 wants to merge 1 commit intoAIDotNet:mainfrom
Open
Add GitHub App credentials configuration via admin UI#328manana2520 wants to merge 1 commit intoAIDotNet:mainfrom
manana2520 wants to merge 1 commit intoAIDotNet:mainfrom
Conversation
Adds a complete admin UI for configuring GitHub App credentials
(App ID, Private Key, App Name) without needing SSH access to
the server. Credentials are stored in the database and validated
against the GitHub API before saving.
Features:
- Configuration form with PEM file upload support
- In-memory credential cache (GitHubAppCredentialCache singleton)
loaded from DB at startup, checked before env var fallback
- Credential validation via GitHub API (JWT + GET /app)
- Connect/disconnect GitHub organizations
- Reset configuration to start fresh
- Soft-delete aware upserts to prevent UNIQUE constraint violations
- Full i18n support (en, zh, ko, ja)
Backend:
- GitHubAppCredentialCache: thread-safe singleton for DB-backed creds
- GitHubAppService: JWT generation, installation token management
- AdminGitHubImportService: config CRUD, org management, batch import
- API endpoints: GET/POST/DELETE /config, POST/DELETE /installations,
GET /install-url, GET /installations/{id}/repos, POST /batch-import
Frontend:
- Admin page at /admin/github-import
- Config form shown only when not configured
- Connected orgs list with disconnect button
- Repository browser with search, filter, pagination
- Batch import with department/language selection
Member
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 complete admin UI for managing GitHub App credentials without needing SSH/environment variable access to the server.
/admin/github-importfor entering App ID, App Name, and Private Key (with PEM file upload)GET /app)GitHubAppCredentialCachesingleton)Backend changes
GitHubAppCredentialCache-- thread-safe singleton loaded from DB at startupGitHubAppService-- JWT generation, GitHub API calls, installation token managementAdminGitHubImportService-- config CRUD, validation, org management, batch importGET/POST/DELETE /api/admin/github/config,POST/DELETE /installations,GET /install-url,GET /installations/{id}/repos,POST /batch-importFrontend changes
/admin/github-importwith configuration form, org list, and repo browser.pemfile into textarea)Test plan
/admin/github-importwithout credentials configured -- config form and setup guide should appear