This repository was archived by the owner on Oct 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: github app token management #1
Merged
Merged
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a complete GitHub App Token Generator package with JWT generation, installation token management, API client integration, CLI tooling, configuration management, and full test fixtures.
- Introduces
TokenManagerfor validate/revoke/list/generate/analyze operations - Implements
GitHubAPIClientfor all GitHub App API calls - Adds CLI (
cli.py), configuration (config.py), formatting (formatters.py), authentication (auth.py), and test fixtures
Reviewed Changes
Copilot reviewed 19 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/conftest.py | Added common pytest fixtures for API responses |
| github_app_token_generator/token_manager.py | Core token operations (validate, revoke, list, generate, analyze) |
| github_app_token_generator/github_api.py | HTTP client for GitHub App endpoints |
| github_app_token_generator/formatters.py | CLI output formatting and coloring utilities |
| github_app_token_generator/cli.py | Argument parser and usage banner |
| github_app_token_generator/config.py | Environment/CLI config loading and validation |
| github_app_token_generator/auth.py | JWT generation and private key handling |
| github_app_token_generator/main.py | Entry point wiring CLI → token manager |
| README.md | Project overview and navigation |
aosagie-tc
reviewed
Jun 20, 2025
cpk_lib_python_github/github_app_token_generator_package/github_app_token_generator/auth.py
Outdated
Show resolved
Hide resolved
cpk_lib_python_github/github_app_token_generator_package/github_app_token_generator/auth.py
Outdated
Show resolved
Hide resolved
cpk_lib_python_github/github_app_token_generator_package/github_app_token_generator/cli.py
Show resolved
Hide resolved
cpk_lib_python_github/github_app_token_generator_package/github_app_token_generator/cli.py
Outdated
Show resolved
Hide resolved
cpk_lib_python_github/github_app_token_generator_package/github_app_token_generator/config.py
Outdated
Show resolved
Hide resolved
cpk_lib_python_github/github_app_token_generator_package/github_app_token_generator/config.py
Outdated
Show resolved
Hide resolved
Collaborator
|
Testing result :
|
Collaborator
Collaborator
|
command: Result : Recommendations: --app-id and --private-key or --private-key-path is compulsory and not optional. |
aosagie-tc
reviewed
Jun 20, 2025
cpk_lib_python_github/github_app_token_generator_package/github_app_token_generator/main.py
Outdated
Show resolved
Hide resolved
aosagie-tc
approved these changes
Jun 21, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

GitHub App Token Management
Overview
This PR introduces a comprehensive GitHub App Token Generator package that provides JWT token generation, installation access token management, and GitHub API integration with full test coverage and professional tooling.
features added
🔐 Token Operations
✅ Generate JWT tokens from GitHub App credentials
✅ Generate installation access tokens for specific organizations or installations
✅ Validate existing tokens - Check if tokens are valid and active
✅ Revoke installation tokens - Invalidate tokens
📋 Installation Management
✅ List all installations - Show where the GitHub App is installed
✅ Show installation details - Organization/user information for each installation/ repos the app is installed on
✅ Find installation by organization - Get installation ID from org name and generate token (or do the same with directly use inst token)
🔍 App Analysis & Information
✅ Analyze GitHub App - Comprehensive app details, permissions, and capabilities
✅ Get app information - Basic app metadata and configuration
✅ Show installation statistics - Repository access and permission details
🛠 Authentication Methods
✅ Private key file authentication - --private-key-path bot.pem
✅ Raw private key authentication - --private-key "-----BEGIN RSA..."
✅ Environment variable support - APP_ID, PRIVATE_KEY_PATH, PRIVATE_KEY
🎯 Token Generation Options
✅ Generate by organization name
✅ Generate by installation ID
✅ JWT token generation - For GitHub App API authentication
🐛 Development & Debug Tools
✅ Debug logging - --debug flag for troubleshooting
✅ Help system - --help for usage guidance
✅ Force operations - --force to skip confirmations