Skip to content

feat(cycle): repo-settings reconcile cycle (#8) - #23

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

lex00 merged 1 commit into
mainfrom
feat/repo-settings-cycle

Conversation

@lex00

@lex00 lex00 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Closes #8.

Adds the repo-settings reconcile cycle — third concrete Cycle, second of the npm-gate set (#5#9).

What it does

Reconciles per-repository settings: description, website, visibility, feature toggles (issues/projects/wiki), merge settings, default branch, and topics.

API:

  • GET /repos/{owner}/{repo} (live)
  • PATCH /repos/{owner}/{repo} (partial settings update)
  • PUT /repos/{owner}/{repo}/topics (full-replacement topics)

Design notes

  • Partial PATCH ⇒ no RMW merge for settings; only declared keys are sent. Topics use a full-replacement PUT, so the list is sent verbatim (managed as a whole list).
  • No repo creation/deletion. This cycle reconciles existing repos only — provisioning/templating is cycle: repository baseline / templating #10. A PATCH against a non-existent repo 404s and is recorded as a failed entry, never a silent create.
  • branchProtection is stripped in buildDesired (owned by the branch-protection cycle).
  • Live-fetch follows the branch-protection scope pattern (scope.repos); with no scope, declared repos appear as creates serviced idempotently by PATCH.

Verification

  • npx tsc --noEmit clean
  • npm test green (272 tests; +20 in repo-settings.test.ts)
  • Action bundle rebuilt for the CI freshness check

🤖 Generated with Claude Code

Reconciles per-repo settings via PATCH /repos/{o}/{r} (partial update,
selective-by-omission) plus topics via the full-replacement PUT
/repos/{o}/{r}/topics. Strips branchProtection (owned by its own cycle);
never creates or deletes repos (provisioning is #10's remit).

Registered, exported, action bundle rebuilt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00
lex00 merged commit 228f95a into main Jun 19, 2026
2 checks passed
@lex00 lex00 mentioned this pull request Jun 19, 2026
1 task
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: repository settings

1 participant