redline-org-ruleset.json

Reference shape for a one-time manual org-level import — not applied by any code here.

The same ruleset shape at organisation level, targeting every repository whose custom property redline equals onboarded.

Lands atNowhere. Nothing installs it.
Put there byAn organisation administrator, by hand, once — Settings → Rulesets → Import. No code in this repository uploads it.
Editing this fileLive — a human copies or imports it

What to know

  • redline init sets redline=onboarded on every repository it onboards (the repo-property capability), which is exactly what this file's condition matches. Imported once, it covers each repository as it is onboarded.
  • scripts/validate.mjs reads it only to check it still requires redline-gate / gate.

Changing it

This file, then re-import it. The property is set in cli/platforms/github/install.ts.

The full checklist is on Changing a template.

The full file

rulesets/redline-org-ruleset.json · 47 lines · 1.1 KB
{
  "name": "Redline (org)",
  "target": "branch",
  "enforcement": "active",
  "conditions": {
    "ref_name": {
      "include": ["~DEFAULT_BRANCH"],
      "exclude": []
    },
    "repository_property": {
      "include": [
        {
          "name": "redline",
          "property_values": ["onboarded"],
          "source": "custom"
        }
      ],
      "exclude": []
    }
  },
  "rules": [
    { "type": "deletion" },
    { "type": "non_fast_forward" },
    {
      "type": "pull_request",
      "parameters": {
        "required_approving_review_count": 1,
        "dismiss_stale_reviews_on_push": true,
        "require_code_owner_review": true,
        "require_last_push_approval": true,
        "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": []
}