ci: author, review, and automerge regen prs via github apps#5
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
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.
Regen PRs are now authored with a convoy-sdk-bot GitHub App token (replacing the personal PAT), so CI triggers as before without depending on a user account. A separate reviewer app approves only diffs whose changed files all match the repo's generated paths; anything else is left unapproved with a comment for human review. Auto-merge is queued after approval, so unresolved finding conversations and the required checks (tests, Cursor Bugbot, Cursor Security Agent) still block the merge.
Note
Medium Risk
Changes CI automation that can approve and queue merges of generated SDK output; safeguards limit auto-approval to allowlisted paths and bot-authored PRs, but misconfiguration of app secrets or the path list could widen what ships without human review.
Overview
Automates regen PR authorship and review using GitHub Apps instead of a personal access token, so opened PRs still run
pull_requestCI and merges can trigger downstream publish workflows.The workflow mints a convoy-sdk-bot app token for checkout, push, and PR creation (replacing
SDK_BOT_PAT/GITHUB_TOKENfallbacks) and commits asconvoy-sdk-bot[bot]. When there is a diff, a second SDK reviewer app approves only PRs authored by that bot whose changed files stay within the generated allowlist (api,client,modelsundercom/getconvoy, aligned withscripts/generate.sh); other paths or authors get a comment and no approval. After a clean approval, squash auto-merge is enabled via the bot token so required checks still gate the merge.Reviewed by Cursor Bugbot for commit 9906149. Bugbot is set up for automated code reviews on this repo. Configure here.