Skip to content

ci: author, review, and automerge regen prs via github apps - #48

Merged
mekilis merged 4 commits into
mainfrom
ci/sdk-regen-auto-review
Jul 20, 2026
Merged

ci: author, review, and automerge regen prs via github apps#48
mekilis merged 4 commits into
mainfrom
ci/sdk-regen-auto-review

Conversation

@mekilis

@mekilis mekilis commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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 release automation and merge gating for generated SDK PRs; mistakes in the path allowlist or token wiring could block merges or approve unexpected diffs, though the workflow is designed to fail open to human review.

Overview
Replaces the Speakeasy reusable workflow with an inlined generate job that mints a convoy-sdk-bot GitHub App token for checkout and generation, so regen PRs trigger pull_request CI and merges can use an app token instead of GITHUB_TOKEN or a PAT. The job exposes branch_name from the Speakeasy action so downstream steps target the exact branch from this run.

Adds an auto-approve job that resolves the open PR on that branch and only auto-approves when the base is main, the author is convoy-sdk-bot[bot], and every changed file (including renames) matches a generated-path allowlist; hand-maintained paths like src/webhook.ts and specific tests are explicitly blocked. On any failed gate it fails open to human review (comment, no approval), clears auto-merge when needed, and re-checks head SHA after approval to avoid racing a new push. Successful reviews enable squash auto-merge via the bot token so publish workflows still run after merge.

Reviewed by Cursor Bugbot for commit 7084138. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread .github/workflows/sdk_generation.yaml Outdated
Comment thread .github/workflows/sdk_generation.yaml
deny paths now clear stale auto-merge before commenting and fail the
step if the disable errors, instead of best-effort || true. an empty
changed-files listing no longer counts as an allowlist pass. renames
are checked on both sides everywhere. approvals are pinned to the
head commit.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 839718b. Configure here.

Comment thread .github/workflows/sdk_generation.yaml Outdated
mekilis added 2 commits July 20, 2026 20:43
pin the approval to the head captured before the allowlist run, then
re-read the head after submitting; if it moved, dismiss the approval
and deny. dismiss_stale_reviews (now enabled) covers pushes after the
review; this covers the window before it.
a dismiss failure under set -e must not skip deny, which is the hard
gate that clears stale auto-merge. dismiss_stale_reviews already
covers the dismissal in the normal case.
Comment thread .github/workflows/sdk_generation.yaml
@mekilis
mekilis merged commit 1288dcc into main Jul 20, 2026
3 checks passed
@mekilis
mekilis deleted the ci/sdk-regen-auto-review branch July 20, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant