redline-ruleset.json

Reference shape only — nothing reads this file; redline init builds the equivalent ruleset at runtime.

The shape of the per-repository branch ruleset: one approval, resolved threads, and the required redline-gate / gate check.

Lands atNowhere. Nothing installs it.
Put there byNothing installs it. redline init builds the equivalent ruleset at runtime in applyPolicy (cli/platforms/github/install.ts) and never reads this file.
Editing this fileNo effect — nothing applies it

What to know

  • It shows the blocking shape, which always includes required_status_checks. A newly onboarded repository starts advisory, where applyPolicy leaves that rule out — so the live ruleset differs from this file on exactly that rule until the repository is promoted.
  • scripts/validate.mjs reads it only to check it still requires redline-gate / gate.
  • Importing it by hand would make the gate blocking immediately, skipping the advisory start.

Changing it

applyPolicy in cli/platforms/github/install.ts. Editing this JSON changes no behaviour.

The full checklist is on Changing a template.

The full file

rulesets/redline-ruleset.json · 50 lines · 1.0 KB
{
  "name": "Redline",
  "target": "branch",
  "enforcement": "active",
  "conditions": {
    "ref_name": {
      "include": [
        "~DEFAULT_BRANCH"
      ],
      "exclude": []
    }
  },
  "rules": [
    {
      "type": "deletion"
    },
    {
      "type": "non_fast_forward"
    },
    {
      "type": "pull_request",
      "parameters": {
        "required_approving_review_count": 0,
        "dismiss_stale_reviews_on_push": true,
        "require_code_owner_review": true,
        "require_last_push_approval": false,
        "required_review_thread_resolution": true,
        "automatic_copilot_code_review_enabled": true,
        "allowed_merge_methods": [
          "squash",
          "merge"
        ]
      }
    },
    {
      "type": "required_status_checks",
      "parameters": {
        "strict_required_status_checks_policy": false,
        "do_not_enforce_on_create": false,
        "required_status_checks": [
          {
            "context": "redline-gate / gate"
          }
        ]
      }
    }
  ],
  "bypass_actors": []
}