Conversation
Adds .claude/skills/bootstrap-repo/ — a thin orchestration skill that applies the full ghcommon house standard (settings, branch protection, labels, dependabot, instruction files, flavor overlay) to a new or existing repo in one command. Wraps existing ghcommon scripts where they exist: - sync-repo-setup.py for instruction/dependabot/AGENTS file copy - sync-github-labels.py for labels.json sync Adds new scripts for the gap (no prior automation): - apply_repo_settings.sh — repo-level settings via gh api PATCH - apply_branch_protection.sh — main protection via gh api PUT - discover_status_checks.py — autodiscovers required checks from PR-triggered workflows - verify_bootstrap.sh — idempotent read-back diff for adoption auditing - bootstrap_repo.sh — orchestrator (create or adopt mode, action/library/service flavor) Reference docs are the source of truth for payloads; scripts mirror them. Cross-refs: - ghcommon issue #264 (future: secret provisioning automation) - ghcommon issue #265 (followup: split ACTION_REPO_STANDARDS by flavor + label audit) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
Live dry-run results —
|
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.claude/skills/bootstrap-repo/— a thin orchestration skill that creates a new GitHub repo (or adopts an existing one) and applies the full ghcommon house standard in one command: settings, branch protection, labels, dependabot, instruction files, flavor overlay.Design summary
jdfalk, override via--ownerjobs.<id>keys from PR-triggering workflowsweb_commit_signoff_requiredrequired_conversation_resolutionenforce_adminshas_issues/has_wiki/has_projectsdismiss_stale_reviews: true)Reference docs (
references/repo-settings.md,references/branch-protection.md) are the canonical source of truth; scripts mirror them. Drift is caught byverify_bootstrap.sh.What's in the PR
SKILL.md— thin trigger doc + usage + flavor decision treescripts/bootstrap_repo.sh— orchestrator (create/adopt × action/library/service)scripts/apply_repo_settings.sh—gh api PATCH /repos/:o/:rscripts/apply_branch_protection.sh—gh api PUT /repos/:o/:r/branches/main/protectionscripts/discover_status_checks.py— YAML parser → required-check contextsscripts/verify_bootstrap.sh— read-back diff, idempotency checkreferences/{repo-settings,branch-protection,flavors}.md— canonical specsReuses
ghcommon/scripts/sync-repo-setup.pyandsync-github-labels.pyrather than duplicating them.Cross-references
ACTION_REPO_STANDARDS.mdby flavor + auditlabels.json(deferred; was originally planned as parallel subagent work but blocked by harness gating on Bash)Test plan
shellcheckpasses on all.shfiles (enforced via pre-commit)ruffpasses ondiscover_status_checks.pydiscover_status_checks.pyproduces correct job IDs against ghcommon's own workflows (19 jobs surfaced)quick_validate.pyreports skill is validjdfalk/bootstrap-test-DELETE-ME(private throwaway): adopt mode, verify state, re-run, confirm idempotency, delete. Pending user authorization — creates and destroys a real (private) GitHub repo.Notes for reviewer
~/repos/github.com/jdfalk/ghcommon(override via--ghcommonor$GHCOMMON_PATH).mainis the default branch. Adopting amaster-default repo requires a manual rename first.jft-library-template,jft-service-template) don't yet exist — the skill falls back to creating an empty repo. Once the skill stabilizes, run it against two empty repos and flipisTemplate: trueto bootstrap the templates from the skill.🤖 Generated with Claude Code