Skip to content

feat(cycle): org-settings reconcile cycle (#5)#22

Merged
lex00 merged 1 commit into
mainfrom
feat/org-settings-cycle
Jun 19, 2026
Merged

feat(cycle): org-settings reconcile cycle (#5)#22
lex00 merged 1 commit into
mainfrom
feat/org-settings-cycle

Conversation

@lex00

@lex00 lex00 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Closes #5.

Adds the org-settings reconcile cycle — the second concrete Cycle after the branch-protection template, and the first of the five npm-publish-gate cycles (#5#9 per the roadmap epic #2).

What it does

Reconciles organization-level settings:

  • default_repository_permission
  • member repo-creation privileges (public / private / internal)
  • public org metadata (description, email, website→blog)
  • surfaced 2FA flag (best-effort; see note below)

API: GET /orgs/{org} (live) + PATCH /orgs/{org} (apply).

Design notes

  • No RMW merge needed. Unlike branch-protection's full-replacement PUT, PATCH /orgs/{org} is a partial update — selective-by-omission is honoured simply by sending only declared keys, so apply does not re-fetch live state.
  • 2FA is best-effort. requireTwoFactorAuthentication is surfaced for drift reporting and forwarded when declared, but GitHub treats it as read-only on most plans (ignored, not errored). Hardened security-feature enforcement is the remit of cycle: security feature enforcement #13.
  • Config (OrgSettings), live shape (LiveOrgSettings), and diffSettings already existed in the harness — this PR adds the cycle (fetchLive/buildDesired/apply), registration, and tests.

Verification

  • npx tsc --noEmit clean
  • npm test green (252 tests; +21 new in org-settings.test.ts)
  • Action bundle (action/index.mjs) rebuilt so the CI freshness check passes

🤖 Generated with Claude Code

Reconciles org-level settings via GET/PATCH /orgs/{org}: default repo
permission, member repo-creation privileges, public metadata, and the
surfaced 2FA flag. PATCH is partial, so selective-by-omission holds by
sending only declared fields (no full-replacement RMW needed).

Registered in the cycle registry and exported from index. Action bundle
rebuilt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00 lex00 merged commit ab20e64 into main Jun 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cycle: org settings

1 participant