Skip to content

Branch rulesets drifted from template intent (extra creation rule + do_not_enforce_on_create) #348

Description

@ptr727

Found during a template re-sync drift check (diffing this repo's live GitHub rulesets against the canonical definitions in ptr727/ProjectTemplate .github/rulesets/{develop,main}.json, per ptr727/ProjectTemplate#211).

Drift

Both develop and main live rulesets differ from the template intent:

  • Extra {"type": "creation"} rule (restricts branch/tag creation) that the template's rulesets do not have, on both branches.
  • required_status_checks.do_not_enforce_on_create: true — template intent is false, on both branches.

Everything else (strict_required_status_checks_policy: false, merge methods, signed-commits, linear-history on develop, etc.) matches.

Fix

Reconcile each live ruleset to the template's committed JSON via a full-payload PUT (GET → change → PUT the whole {name, target, enforcement, bypass_actors, conditions, rules}; partial PUTs 422), per ptr727/ProjectTemplate README "Rules / Rulesets" and AGENTS.md "Staying in Sync".

First decide whether the extra creation rule is intentional for this repo:

  • If not intentional → drop it and set do_not_enforce_on_create: false to match the template.
  • If intentional → keep it, but note the divergence so the next drift check expects it.

This is maintainer-gated (touches live config); an agent should surface it, not apply it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions