Skip to content

docs: add GitHub Rulesets merge method configuration#4

Merged
CybotTM merged 1 commit intomainfrom
fix/ruleset-merge-method-docs
Dec 26, 2025
Merged

docs: add GitHub Rulesets merge method configuration#4
CybotTM merged 1 commit intomainfrom
fix/ruleset-merge-method-docs

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented Dec 26, 2025

Summary

  • Change recommended merge method from rebase to merge commits
  • Add new section documenting GitHub Rulesets allowed_merge_methods setting
  • Document diagnosis and fix for "Rebase is not an allowed merge method" warning
  • Add troubleshooting triggers for ruleset conflicts

Problem

When a GitHub repository has:

  1. Repository-level setting: allow_rebase_merge: false
  2. Ruleset setting: allowed_merge_methods: ["merge", "rebase"]

GitHub shows a confusing warning on PRs: "Rebase is not an allowed merge method in this repository"

This happens because the Ruleset's pull_request rule has its own allowed_merge_methods parameter that can conflict with repository settings.

Solution

Document:

  1. How to diagnose the mismatch using gh api
  2. How to update the ruleset to match repository settings
  3. Alignment table for repository vs ruleset merge method settings

Test plan

  • Verify documentation is clear and actionable
  • Confirm CLI commands work as documented

- Change recommended merge method from rebase to merge commits
- Add new section documenting GitHub Rulesets allowed_merge_methods
- Document diagnosis and fix for 'Rebase is not an allowed merge method' warning
- Add troubleshooting triggers for ruleset conflicts
- Add alignment table for repository vs ruleset settings
@CybotTM CybotTM merged commit 99d8064 into main Dec 26, 2025
2 checks passed
@CybotTM CybotTM deleted the fix/ruleset-merge-method-docs branch February 8, 2026 20:21
CybotTM added a commit that referenced this pull request May 4, 2026
…in-repo locations

GH-3 (SECURITY.md), GH-4 (CONTRIBUTING.md), and GH-5 (CODEOWNERS) check
for project-local files. GitHub honours these files org-wide via the
special `.github` repo (e.g. netresearch/.github), so many repos that
appear "missing" these files actually have them satisfied at the org level.

The assessment runner cannot cheaply verify org-wide files (it would have
to call the GitHub API, which requires auth and is outside the command
allowlist). Demoting these from `warning` to `info` better reflects the
real situation: nice-to-have at the repo level, often satisfied elsewhere.
The descriptions now mention the org-wide fallback explicitly.

Also broaden each target with brace expansion for the documented in-repo
locations:
  - SECURITY.md      → {SECURITY.md, .github/SECURITY.md, docs/SECURITY.md}
  - CONTRIBUTING.md  → {CONTRIBUTING.md, .github/CONTRIBUTING.md, docs/CONTRIBUTING.md}
  - CODEOWNERS       → {.github/CODEOWNERS, CODEOWNERS, docs/CODEOWNERS}

GitHub itself accepts CODEOWNERS in any of those locations.
CybotTM added a commit that referenced this pull request May 5, 2026
GH-3 (SECURITY.md), GH-4 (CONTRIBUTING.md), GH-7 (PR template)
declare org_provides: paths so the runner falls back to
`gh api repos/{owner}/.github/contents/<path>` when the local file
is missing. Repos that opt into org-wide community-health files (the
documented GitHub default) now stop being flagged.

GH-7 also accepts both PULL_REQUEST_TEMPLATE.md and the lowercase
pull_request_template.md (which is what netresearch/.github actually
uses) — GitHub treats these case-insensitively.

GH-5 (CODEOWNERS) intentionally stays local-only — GitHub's review
routing only honours CODEOWNERS in the consuming repo, not the org's
.github fallback.

GH-8 / GH-9 (issue templates) declare org_provides for completeness
but most orgs don't ship default issue templates; for those repos
this still surfaces as a finding. When an org does provide them at
{owner}/.github/.github/ISSUE_TEMPLATE/<name>, the checkpoint passes.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
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