Skip to content

chore(ci): add CODEOWNERS and Dependabot auto-merge - #244

Merged
SyniRon merged 1 commit into
developfrom
chore/issue-243-branch-protection
Jul 27, 2026
Merged

SyniRon merged 1 commit into
developfrom
chore/issue-243-branch-protection

Conversation

@SyniRon

@SyniRon SyniRon commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Closes #243 (partially — the ruleset side is applied via the API; this is the in-repo half).

Two files, landing alongside the move from classic branch protection to rulesets.

.github/CODEOWNERS

Routing only, sole owner. The default-branch ruleset leaves require_code_owner_review off: GitHub's softener is that an approval from any one code owner suffices, which needs two or more owners who actually review before the rule is anything other than a merge block. Worth revisiting if a second regular reviewer appears.

.github/workflows/dependabot_auto_merge.yml

Arms GitHub auto-merge on non-major Dependabot PRs. It bypasses nothing — the PR still waits on the Build/Lint/Test gate the ruleset requires, so this only removes the manual click once that gate is green. Majors still land by hand.

  • The permissions: block is load-bearing, not defensive: Dependabot-triggered workflows get a read-only GITHUB_TOKEN regardless of the repository default, and the merge step fails on permissions without it.
  • pull_request, not pull_request_target, and the PR URL is passed through env: rather than interpolated into run: — workflow injection is a live risk in Dependabot-adjacent workflows.
  • dependabot/fetch-metadata pinned to full semver to match the convention already used by go.yml and build_and_push.yml.
  • dependabot.yml does no grouping, so each PR carries exactly one update and the major-version gate can't be straddled by a mixed batch.

Verification limit

This PR is authored by a human, so the Auto-merge job will show as skipped — that proves the actor gate holds and the workflow parses, and nothing more. The merge step and the permissions: block are not exercised until a real Dependabot PR runs. Next week's batch is the first true test.

This PR also doubles as the vehicle for confirming the new ruleset behaves before classic protection is deleted.

This was generated by AI

Repository protection moved from classic branch protection to rulesets.
Two files land alongside that change.

CODEOWNERS is routing only. `require_code_owner_review` stays off in the
ruleset: an approval from any one code owner satisfies it, so the rule
needs two or more owners who actually review before it is anything but a
merge block on a repo with a single author.

The auto-merge workflow arms GitHub auto-merge on non-major Dependabot
PRs. It bypasses no control — the PR still waits on the Build/Lint/Test
gate the ruleset requires — it only removes the manual click once that
gate is green. Majors continue to land by hand.

The `permissions:` block is required rather than defensive: workflows
triggered by Dependabot receive a read-only GITHUB_TOKEN regardless of
the repository default, and the merge step fails without it.

> *This was generated by AI*
@SyniRon
SyniRon merged commit 7108653 into develop Jul 27, 2026
4 checks passed
@SyniRon
SyniRon deleted the chore/issue-243-branch-protection branch July 27, 2026 21:03
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.

chore: replace classic branch protection with rulesets, protect tags, auto-merge Dependabot

1 participant