[TT-17030] Replace ADMIN_PAT with GitHub App token in force-merge.yaml#114
Conversation
Migrate force-merge reusable workflow from ADMIN_PAT to GitHub App tokens. The workflow now accepts PROBE_APP_ID and PROBE_APP_PRIVATE_KEY secrets instead of ADMIN_PAT, and generates a token via actions/create-github-app-token. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This PR updates the Files Changed Analysis
Architecture & Impact AssessmentThis change isolates the force-merge authentication mechanism to a dedicated GitHub App, improving security by moving away from a user-associated PAT. The core logic of the script remains unchanged, but the authentication method is modernized. Affected Components:
Authentication Flow: graph TD
subgraph force_merge_yaml ["force-merge.yaml"]
A[Start] --> B{Generate Token};
B -- App ID & Private Key --> C[actions/create-github-app-token];
C -- "Generates Short-Lived Token" --> D{Execute Merge Script};
D -- "Uses Token" --> E[actions/github-script];
end
E -- "Authenticates with GitHub API" --> F[Merge PR];
Scope Discovery & Context ExpansionThe direct impact is limited to this workflow file. However, the change has a wider blast radius, affecting all CI/CD pipelines that rely on this reusable workflow for force-merging. A codebase search for Metadata
Powered by Visor from Probelabs Last updated: 2026-04-22T16:24:50.060Z | Triggered by: pr_opened | Commit: 7a6e7ee 💡 TIP: You can chat with Visor using |
Security Issues (1)
Architecture Issues (1)
Security Issues (1)
No performance issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2026-04-22T16:24:25.065Z | Triggered by: pr_opened | Commit: 7a6e7ee 💡 TIP: You can chat with Visor using |
Summary
ADMIN_PAT(PAT) to GitHub App tokensADMIN_PATsecret withPROBE_APP_IDandPROBE_APP_PRIVATE_KEYactions/create-github-app-tokenstep to generate a token before the merge stepgithub-tokeninactions/github-scriptfor merge operationsNote
The GitHub App must have sufficient permissions (admin/bypass branch protection) for force-merge to work. Verify the app's installation permissions cover this use case.
Test plan
/force-merge <reason>on a test PR🤖 Generated with Claude Code