Skip to content

cycle: environments & deployment-protection #12

@lex00

Description

@lex00

Reconcile deployment environments — required reviewers, wait timers, deployment branch policies. API: /repos/{o}/{r}/environments + its protection-rule and branch-policy sub-resources. RMW: preserve undeclared protection rules on update.

How (cold-handoff): copy the template at src/cycles/branch-protection.ts (read it + src/cycles/README.md). Implement the Cycle interface from src/reconcile/runner.ts (fetchLive/buildDesired/apply receive orgLogin — use it for API paths). Extend src/config/types.ts (all optional — selective-by-omission). Auth src/auth/app-client.ts; diff src/reconcile/diff.ts; guardrails src/reconcile/guardrails.ts. Register in src/cli/registry.ts. Apply = read-modify-write (preserve undeclared live fields); charge the rate budget. Verify via the runner with a mock-client test; tsc clean; tests green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions