redline-org-ruleset.json
Reference shape for a one-time manual org-level import — not applied by any code here.
What this is
A reference document of the same ruleset shape, scoped by the custom repository property redline=onboarded instead of applying it per repo.
How to onboard it
- Installed as: Nowhere — not installed by anything.
- Installed by: Nothing in this codebase automates this. Based on its condition, the intended actor is an org administrator, once, by hand.
How to use it
Verify with the platform team before relying on this as a working pipeline — it is a reference shape for a manual step, not automation this repo performs.
- redline init does set the redline=onboarded custom property on every repo it onboards, via the same applyPolicy call that would otherwise write the per-repo ruleset — that property is exactly what this file's repository_property condition matches.
- No code imports or uploads this JSON to GitHub's organization rulesets API anywhere in this repository. The apparent mechanism — inferred from the property condition, not confirmed by any script — is a one-time manual import by an org administrator (organisation Settings → Rulesets → New ruleset → Import), so the policy need not be reapplied per repo as more repos onboard.
Expected output
Nothing automatic. redline init does set the custom repository property redline=onboarded that this file's condition matches, but no code here uploads this JSON to the organisation rulesets API — the import is a manual one-time step by an org administrator, inferred from the property condition rather than confirmed by any script in this repository.
How to edit it
The real source: cli/platforms/github/install.ts sets the property. The ruleset itself is imported by hand, so changing this file changes nothing until someone re-imports it.
- Check whether the CLI reads this file at allSeveral of these are reference shapes: the CLI generates the equivalent in code and never opens the checked-in copy. Editing one of those changes nothing about what redline init writes. The onboarding section above says which kind this is.
- Edit the real sourceFor a generated artifact that is cli/commands/init.ts; for a file installed verbatim it is the template itself.
- npm test && node scripts/validate.mjsThe install path is unit-tested against a fake host client, and validate.mjs pins the shapes the merge gate's required check name depends on.
The full file
{
"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": []
}