ci: arm auto-merge on Fern regeneration PRs - #67
Merged
Conversation
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
marked this pull request as ready for review
August 24, 2026 23:55
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.
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?
.github/workflows/auto-merge.yml. Onpull_request_targetit approves the PR and runsgh pr merge --auto --squash, for a PR opened byfern-api[bot](user id115122769) from an in-repofern-bot/*branch targeting the default branch. It checks out nothing, which is what makespull_request_targetsafe here.Approvestep 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 becausecan_approve_pull_request_reviewsis enabled on this repo — verified..fernignore. Fern reads.fernignorefrom the PR's base branch, so the entry only protects the file once this lands.whopio/whopsdk-typescriptmain(blobd85212244c9b454cac360987a3ffd4957d49e848), which mergedwhopsdk-typescript#74with no human action.lint,test,build,decideall reported on#59(merged, all foursuccess) and on#56(all four report;testis red there for an unrelated reason). No context is missing.#56is an open, conflicted Fern PR superseded by#59— the shape that stalls forever. Not touched here.