Skip to content

Ruleset: require the private-patterns check on main - #3

Merged
danjonesio merged 1 commit into
mainfrom
require-private-patterns
Sep 18, 2026
Merged

danjonesio merged 1 commit into
mainfrom
require-private-patterns

Conversation

@danjonesio

Copy link
Copy Markdown
Owner

What

Adds required_status_checks to .github/rulesets/default-branch.json: one context, private-patterns, with strict_required_status_checks_policy: true (the branch must be up to date with main before merging). No integration_id, per the d-github reference.

Why it is safe to require

  • The name is what GitHub recorded, not what the workflow file suggests: gh api repos/danjonesio/deej-stack/commits/<main>/check-runs lists private-patterns, completed, success, app github-actions.
  • The workflow triggers on every pull_request with no paths: or if: filter, so the check always reports; a required check that never reports would block merging forever.
  • Fork PRs and Dependabot PRs see an empty secret and pass with a notice, so they are not locked out. The push run on main after merge does the real check for those.

Already applied

Ruleset 23647785 was updated in place (PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}, verified against docs.github.com/en/rest/repos/rules on 2026-09-18). Read back from rules/branches/main: deletion, non_fast_forward, pull_request, required_status_checks [private-patterns] strict=true. This PR is the first one gated by it, so its merge box should show private-patterns as Required.

Also

.github/dependabot.yml header: the branch-protection paragraph said there were no required checks; now says strict checks mean Dependabot PRs rebase after each merge, which is what the groups are for.

Still true

The check passes with a notice and checks nothing until ~/.config/deej-stack/private-patterns exists and PRIVATE_PATTERNS is set. Requiring it now means it is already in place the day the list exists.

The check-run name on main's latest commit is `private-patterns` (app
github-actions), and the workflow has no paths: or if: filter, so it
reports on every PR, fork and Dependabot PRs included (they pass with a
notice on an empty secret). Ruleset 23647785 updated in place with
PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}; read back as deletion,
non_fast_forward, pull_request, required_status_checks strict=true.
dependabot.yml header updated: strict checks now mean Dependabot PRs
rebase after each merge.
@danjonesio
danjonesio merged commit 7321a42 into main Sep 18, 2026
1 check passed
@danjonesio
danjonesio deleted the require-private-patterns branch September 18, 2026 09:05
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