Skip to content

Document the repository merge setting a ruleset cannot set - #9

Merged
mxwlf merged 1 commit into
mainfrom
docs/repo-merge-setting-note
Sep 24, 2026
Merged

mxwlf merged 1 commit into
mainfrom
docs/repo-merge-setting-note

Conversation

@mxwlf

@mxwlf mxwlf commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Ports a gap found in dotnet-template back into this template's ruleset docs.

allowed_merge_methods only narrows what the repository already permits. The
allow_merge_commit / allow_squash_merge / allow_rebase_merge switches live on
the repository, are not part of any ruleset, and make rulesets-apply therefore
cannot set them. Requiring merge commits in a repo that has them switched off fails
with:

Merge commits are not allowed on this repository.

That is exactly what happened on the first merge in dotnet-template, with a
correct ruleset applied. This repository already has merge commits enabled — verified
via the API — so the note is forward-looking here, and says so rather than implying
action is needed.

Documentation only; no configuration changes.

`allowed_merge_methods` only narrows what the repository already permits. The
`allow_merge_commit` switch lives on the repository, not in any ruleset, so
`make rulesets-apply` cannot reproduce it — which makes it the one part of the gate
a fresh repo has to set by hand.

This repository already has it enabled, so the note is forward-looking here. It was
found the hard way in dotnet-template, where the first merge under this policy
failed with "Merge commits are not allowed on this repository." despite the ruleset
being correct.
@mxwlf
mxwlf merged commit d634dfd into main Sep 24, 2026
1 check passed
@mxwlf
mxwlf deleted the docs/repo-merge-setting-note branch September 24, 2026 23:13
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