| 1 | // The host the flake's protect-e2e check drives: the four states a |
| 2 | // project's refs can be in. "sealed" is the norm — protected, with no |
| 3 | // writer, so nothing pushes to it and changes land by integration. |
| 4 | // "guarded" declares the writers exception over the default protected set, |
| 5 | // "released" names a wildcard pattern beside it and opens release tags to |
| 6 | // the principal that cuts them, and "open" declares no protection at all |
| 7 | // and so has none. |
| 8 | // |
| 9 | // Which keys act as the "integrator" principal is machine integration |
| 10 | // (services.valley.authorizedKeys), not declared here — the name is what |
| 11 | // the identity registry will bind, and this declaration is what names it. |
| 12 | package valley |
| 13 | |
| 14 | projects: { |
| 15 | "sealed": protection: refs: ["refs/heads/main"] |
| 16 | |
| 17 | "guarded": protection: writers: ["integrator"] |
| 18 | |
| 19 | "released": protection: { |
| 20 | refs: ["refs/heads/main", "refs/heads/release/*"] |
| 21 | writers: ["integrator"] |
| 22 | allow: [{ |
| 23 | refs: ["refs/tags/release/*"] |
| 24 | writers: ["integrator"] |
| 25 | }] |
| 26 | } |
| 27 | |
| 28 | "open": {} |
| 29 | } |