Skip to content

ci: arm auto-merge on Fern regeneration PRs - #67

Merged
antonwhop merged 2 commits into
mainfrom
anton/arm-auto-merge-for-fern-prs
Aug 24, 2026
Merged

ci: arm auto-merge on Fern regeneration PRs#67
antonwhop merged 2 commits into
mainfrom
anton/arm-auto-merge-for-fern-prs

Conversation

@antonwhop

@antonwhop antonwhop commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Why / Prompt

Fern's SDK regeneration PRs sit open until a human clicks merge; this makes them merge themselves once the required checks pass.

What changed?

  • Adds .github/workflows/auto-merge.yml. On pull_request_target it approves the PR and runs gh pr merge --auto --squash, for a PR opened by fern-api[bot] (user id 115122769) from an in-repo fern-bot/* branch targeting the default branch. It checks out nothing, which is what makes pull_request_target safe here.
  • The Approve step is the load-bearing part. GitHub Actions cannot be added as a ruleset bypass actor (422: Actor GitHub Actions integration must be part of the ruleset source or owner organization), so the approval satisfies the required review instead of bypassing it. It counts because can_approve_pull_request_reviews is enabled on this repo — verified.
  • Adds the workflow to .fernignore. Fern reads .fernignore from the PR's base branch, so the entry only protects the file once this lands.
  • The file is byte-identical to the copy running on whopio/whopsdk-typescript main (blob d85212244c9b454cac360987a3ffd4957d49e848), which merged whopsdk-typescript#74 with no human action.
  • Required contexts verified on real Fern PRs: lint, test, build, decide all reported on #59 (merged, all four success) and on #56 (all four report; test is red there for an unrelated reason). No context is missing.

#56 is an open, conflicted Fern PR superseded by #59 — the shape that stalls forever. Not touched here.

antonwhop and others added 2 commits August 24, 2026 13:56
Adds a pull_request_target workflow that enables squash auto-merge for pull
requests opened by fern-api[bot] from an in-repo fern-bot/* branch, and lists
it in .fernignore so a regeneration cannot prune it.
@antonwhop
antonwhop marked this pull request as ready for review August 24, 2026 23:55
@antonwhop
antonwhop merged commit 69f1d37 into main Aug 24, 2026
7 checks passed
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