Merge modes
When autofeat stops, approves, or merges, and which checks must be green.
autonomy.merge_mode decides what the merge action does. The default is stop_before_merge. autonomy.auto_approve defaults to false. While it is false, config load rewrites merge_mode to stop_before_merge. approve_only and auto apply only when auto_approve is true.
Change these keys on the default branch. A pull request cannot change its own policy. See Configure.
Modes
merge_mode | Needs auto_approve: true | What merge does |
|---|---|---|
stop_before_merge | No. This is the forced value when auto_approve is false. | Adds autofeat:ready. Does not approve. Does not merge. |
approve_only | Yes. | Submits an approving review (autofeat auto-approve), then adds autofeat:ready. Does not merge. |
auto | Yes. | Submits that approving review, then merges the pull request. |
A dry run never merges. The merge action returns dry_run: would merge and leaves the pull request open. See Budgets and billing.
Before an approve or a merge, the worker loads the stored gate evidence and rechecks live checks on that head. stop_before_merge refuses those privileged writes. approve_only refuses a merge. A same-UID run (security.allow_same_uid: true) cannot authorize them either.
auto_approve
auto_approve: false is the safe default. doctor records auto_approve as PASS with detail auto_approve is false.
Set auto_approve: true only when you want approve_only or auto. doctor then reads branch protection on autonomy.merge_target:
| Branch protection | doctor row |
|---|---|
| Requires one or more approvals | WARN. Hint: the App cannot approve a PR it authored. |
| Protection could not be read | WARN. Same hint. |
| No required approvals | PASS. |
GitHub will not count an approval from the App that opened the pull request. If the target branch requires a review, auto cannot satisfy that rule by itself. Keep a human review, or drop the required-approval rule for branches you intend autofeat to merge.
doctor also prints a banner. When dry_run is false and merge_mode is auto, the banner includes:
WARNING: dry_run=false with merge_mode=auto permits unattended mergesThat line is a warning, not a FAIL row.
require_green_checks
autonomy.require_green_checks defaults to true.
The gate action polls check runs on the head. With the default, a head that has zero checks is not treated as green. Set require_green_checks: false only when an empty check list, with no missing names and no untrusted producers, should count as success.
checks.required_checks names extra contexts that must pass. checks.required_producers pins a name to a GitHub App id (integer) or slug (string). A pass from any other producer is a refusal. checks.allow_missing_checks defaults to false: a named check that is absent is a refusal.
Do not put an autofeat/ name in required_checks or required_producers. Config load refuses any name that starts with autofeat/ (compared case-insensitively). Those runs are autofeat's own checks. A gate that waits on itself never finishes.
checks:
required_checks: ["ci / test"]
required_producers:
"ci / test": 12345
allow_missing_checks: falseReplace 12345 with the GitHub App id that produces that check, or use the App slug string.