Add GitHub App token minting for GitHub MCP server#11660
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot rename app-token step (for safe-outputs) to safe-outputs-app-token |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Changed step ID from "app-token" to "safe-outputs-app-token" in safe_outputs_app.go - Updated all references to steps.app-token.outputs.token -> steps.safe-outputs-app-token.outputs.token - Updated mcp_github_config.go to replace "safe-outputs-app-token" with "github-mcp-app-token" - Updated test expectations for new step ID naming This differentiates safe-outputs app tokens from GitHub MCP app tokens. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot create a shared agentic workflow that configure the GitHub MCP to use the app for the current repo. Use in smoke-Claude |
- Created .github/workflows/shared/github-mcp-app.md shared workflow - Configures GitHub MCP server to use GitHub App for authentication - Updated smoke-claude.md to import the shared configuration - Recompiled all workflows to apply safe-outputs-app-token renaming The shared workflow provides: - Centralized GitHub App configuration for MCP server - Automatic token minting with permission mapping - Token invalidation on workflow end - Repository-scoped variables (GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in d1acc15. Created The shared workflow:
|
|
@copilot use the same env variable names as for the safe output app |
- Updated shared/github-mcp-app.md to use APP_ID and APP_PRIVATE_KEY (same as safe-outputs) - Updated test file to use APP_ID and APP_PRIVATE_KEY for consistency - Updated schema examples to consistently use APP_ID and APP_PRIVATE_KEY This ensures both safe-outputs and GitHub MCP use the same repository variables. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
Smoke Test Results ✅PR #11678: Add report formatting guidelines to daily-compiler-quality workflow ✅ GitHub MCP Status: PASS Run: §21318175451 cc @pelikhan
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Add report formatting guidelines to daily-compiler-quality workflow ✅
|
|
Smoke Test Results
✅ GitHub MCP Testing Overall Status: PASS
|
Document the new GitHub App authentication feature for GitHub MCP server added in PR #11660. This feature enables short-lived, automatically-revoked tokens with automatic permission mapping from job permissions. Key additions to tools reference: - New "GitHub App Authentication" section - Configuration with app-id and private-key - Benefits: short-lived tokens, auto-revocation, no PAT rotation - Setup instructions and shared workflow pattern - Token precedence and permission mapping documentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add GitHub App Token Support for GitHub MCP Server
✅ Completed
📝 Implementation Summary
New Feature: GitHub App token minting for GitHub MCP server
Step IDs (updated naming):
safe-outputs-app-token(renamed fromapp-token)github-mcp-app-token${{ steps.safe-outputs-app-token.outputs.token }}${{ steps.github-mcp-app-token.outputs.token }}Shared Workflow:
shared/github-mcp-app.mdAPP_ID,APP_PRIVATE_KEY(same as safe-outputs)Configuration Example:
Direct configuration:
Using shared workflow (recommended):
Repository Variables (shared between safe-outputs and GitHub MCP):
APP_ID- GitHub App IDAPP_PRIVATE_KEY- GitHub App private keyHow it Works:
permissionsfieldgithub-tokenand default token fallbackcontents: read,issues: write)if: always()conditionFiles Changed:
tools_types.go: AddedApp *GitHubAppConfigfield toGitHubToolConfigtools_parser.go: Added parsing forappconfigurationmcp_github_config.go: Added token minting and invalidation step generatorscompiler_yaml_main_job.go: Integrated minting (before MCP setup) and invalidation (at job end)mcp_environment.go: Updated token precedence to prioritize app tokenmain_workflow_schema.json: Addedappproperty to GitHub tool schema with consistent variable namesgithub_mcp_app_token_test.go: 4 comprehensive tests using APP_ID and APP_PRIVATE_KEYsafe_outputs_app.go: Renamed step ID fromapp-tokentosafe-outputs-app-tokensafe_outputs_env.go: Updated token referencescompiler_safe_outputs_steps.go: Updated token referencesshared/github-mcp-app.md: New shared workflow for GitHub MCP app configuration (uses APP_ID, APP_PRIVATE_KEY)smoke-claude.md: Updated to use shared github-mcp-app workflow✅ Testing
All tests passing:
TestGitHubMCPAppTokenConfiguration- Config parsingTestGitHubMCPAppTokenMintingStep- Step generation with APP_ID/APP_PRIVATE_KEYTestGitHubMCPAppTokenOverridesDefaultToken- Override behaviorTestGitHubMCPAppTokenWithRemoteMode- Remote mode supportOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Changeset