Repository navigation
Description
Problem
Owner direction of 2026-11-22: "simplify repo onboarding to a single command and the minimum number of manual steps as required by github permissions model, not 10+ steps that have to be figured out every time I add a repo".
- On 2026-11-22 the onboarding of dan-petty/infra and dan-petty/devtools took more than 10 steps by hand, found one at a time: the
releaseenvironment, its branch rule, variable and secret; the Renovate preset; the release-please config and workflow; scope labels thatdevops pr createneeds; the merge settings; the webhook of the Service;service.repos; and the checks ofdevops roadmap onboard. - The settings now differ between repositories (2026-11-22): devops-cli is squash only with the PR title; infra, homelab and vibes also allow merge and rebase; auto-merge is off in danielpetty.com, homelab and vibes; danielpetty.com and homelab have no ruleset.
devops roadmap onboard(feat(roadmap): onboard checks a repository for the roadmap jobs #1359) checks 7 prerequisites and creates only missing labels. It prints the other steps.- feat(gh): manage GitHub organization and repository settings as code #5311 plans repository settings as code with OpenTofu (integrations/github), and leaves labels, secret values and webhooks out of tofu.
Proposed remedy
One command, for example devops repos onboard <owner>/<name>, that a person runs with their own GitHub login (only a person changes settings and secrets). It does every step that the GitHub API allows, opens one pull request with the files of the templates, and prints only the steps that GitHub allows only a person in the web UI to do. --plan shows the steps and changes nothing. Running it again changes nothing on a repository that is already onboarded.
A design study first answers:
- The list of each onboarding step, with its source, and for each one: API with the token of the person, file in the template pull request, or web UI only (with the GitHub document that says so).
- How the command and feat(gh): manage GitHub organization and repository settings as code #5311 split the settings, so that one place owns each setting.
- The templates of the pull request (Renovate preset, release-please, PR title check, labels, clear-status) and where they live (dan-petty/infra).
- How the command reads secret values by reference (keyring or a file) and never prints them.
Acceptance criteria
- A design names each step and its group, with sources, and the owner decides it.
- After the build, onboarding a new repository is one command plus at most the steps that GitHub allows only in the web UI, and the command on an onboarded repository reports no change.
Person steps
- The owner decides the design.
Dependencies
- feat(templates): add the Copier template of a new repository infra#37 (the Copier template), feat(ci): add reusable PR title and release workflows infra#38 (the reusable workflows).
- feat(gh): seal a secret into an environment with secret sync #6781 (environment secrets in
devops gh secret sync), docs(adr): give the repository settings to devops repos onboard #6782 (the ADR of decision D1), feat(service): clear status labels when an issue closes #4660 (clear-status moves to the Service). - Related: feat(roadmap): onboard checks a repository for the roadmap jobs #1359, feat(gh): manage GitHub organization and repository settings as code #5311, feat(gh): set a release App key of its own in each repository #6769, feat(repos): report the drift of onboarded repositories nightly #6783, chore(repos): bring the 7 existing repositories to the baseline #6784.
Alternatives check of 2026-11-22: partly.
Tool: integrations/terraform-provider-github (https://github.com/integrations/terraform-provider-github), MIT, last activity 2026-11-19, maintained.
Reason: Searches found no single onboarding tool; the GitHub provider that the issue and ADR 0026 already use applies repository, environment, label and webhook settings declaratively, but it opens no template pull request and prints no web-UI-only steps.
Covers:
- Declarative merge, ruleset and branch-rule settings
- Environments, variables, secrets and webhook resources
- A plan shows drift, so a rerun changes nothing
Lacks:
- Opens no pull request with the template files
- Secret values sit in state, not read by reference
- Prints no list of web-UI-only steps
- No design study of each step and its group
Activity
dan-petty commentedon Nov 22, 2026
Both cover repository onboarding, but #6377 asks only for the creation and app-install step while the candidate asks for one command that performs every onboarding step.devops-cli-service commentedon Nov 22, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (7)
Tools considered:
Searches run:
Sources:
dan-petty commentedon Nov 22, 2026
devops repos onboard: final design for #6773
Summary
Build one command:
devops repos onboard <owner>/<name> --confirm. The person runs it with their gh login. It applies each repository setting by REST, opens one template pull request and connects the Service.Manual steps for a new public repository today: 1, the command run. Web UI steps: 0. After #6769: 1 more web UI step.
The command
--plan(default) sends GET requests only.--dry-runsends no request.--confirmwrites.--all --planis the nightly drift check. It exits 1 on a pending change. Apply and drift use one code path..copier-answers.ymlexists. Then the command refuses a flag that differs from that file.--confirmsends 0 writes and exits 0. After a failure, the next run continues.devops roadmap onboardand reuses its rows (src/devops_cli/roadmap/onboard.py:447, :477) and tests (tests/roadmap/test_roadmap_onboard.py:255, :290).What it does
repo,workflow; ruleset probe (403 = plan limit); fail on aSERVICE_APP_*namePOST /user/repos, only with--createPATCH /repos/{o}/{r}: squash only,PR_TITLE/PR_BODY, auto-merge, secret scanning (ADR 0012:153)GET code-quality/setup; on 404 "not available", report it; elsePATCH state=configuredrelease, branch policymain, variableRELEASE_APP_CLIENT_IDdevops gh secret sync --env releaserouteGET installation; on a miss,PUT /user/installations/{id}/repositories/{rid}devops ai agents, draft PR (AGENTS.md rule 6), wait for checksmain*counts as all events (#6662)service.repos,push-secrets --rotate,deploy-stack(D4)--serviceonly: homelab services PRThe baseline keeps the
code_qualityrule. It does not block merges (ruleset 21466414 has it, and #6766 merged). After a move to a Team organization, row 4 turns the feature on.A route-ownership test lists each write route. It fails when a route writes a setting of another owner (tofu, the Service, the template).
What stays with a person
devops config set. GitHub rule: GitHub never returns a secret value (https://docs.github.com/en/rest/actions/secrets).--serviceonly: merge the homelab PR. Project rule: only a person merges (AGENTS.md).Code Quality needs 0 steps. The API exists (https://docs.github.com/en/rest/code-quality/code-quality). Here, GET answers 404 "not available", because the feature needs a Team or Enterprise license (https://docs.github.com/en/billing/concepts/product-billing/github-code-quality).
Templates
Home: dan-petty/infra (ADR 0032:40, :57).
copier.ymluses_subdirectory: templates/repositoryand has no tasks, so no--trust. The Renovate copier manager proposes new tags (https://docs.renovatebot.com/modules/manager/copier/).Files:
renovate.json,labels.yml(scopes only),CODEOWNERS, callerspr-title.ymlandrelease.yml, release-please files,openspec/config.yaml,.devops/project.toml,.pre-commit-config.yaml.infra adds two
workflow_callworkflows (none today). pr-title reads the caller'slabels.yml. The release job setsenvironment: release(https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows).Left out:
clear-status.yml(#4660 moves it to the Service), workflow label copies, secrets.Secrets
RELEASE_APP_PRIVATE_KEYcomes by reference from the keyring or--release-key-file. The PyNaCl box of src/devops_cli/github/secrets.py:53 seals it, and the PUT body goes on stdin (secrets.py:167). The command checks presence by name only.secrets.token_hex(32)in memory.can_approve_pull_request_reviews=falseis derived (no workflow approves), not an owner rule.Relation to #5311, #1359, #6769, #6770
devops roadmap onboard. Its 7 rows and 3 RAG rows move here.Build plan
github/repository.yamldevops gh secret sync --envTotal: about 4.5M tokens, 5.25 agent-days, 2 calendar days. Issues 1-3 come before 4, and #4660 before or with 4. #4417 deletes row 12. After D1, flag (do not drop) #6377, #3775, #3742, #3753, #3770, #4664 and #4913.
Decisions for the owner
--confirmeditsservice.reposand deploys. Recommendation: yes, from a cleanorigin/mainonly.dan-petty commentedon Nov 22, 2026
Owner decisions of 2026-11-22 on the design above (given to the agent session, recorded here):
devops repos onboardowns the repository settings (merge methods, rulesets, environments, variables). A new ADR amends ADR 0026 decisions 1, 4 and 7 (feat(gh): manage GitHub organization and repository settings as code #5311): tofu keeps only the organization checks and the transfer check.--confirmadds the repository toservice.reposand runspush-secretsanddeploy-stack, only from a cleanorigin/maincheckout of devops-cli.Build issues follow, and this item is the command itself.
docs(adr): give the repository settings to devops repos onboard (#6788)
feat(gh): seal a secret into an environment with secret sync (#6789)
docs(openspec): plan #6773 one command onboards a repository
docs(openspec): plan #6773 one command onboards a repository
chore(main): release 0.196.0 (#6809)
devops-cli-service commentedon Nov 22, 2026
Released in v0.196.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.196.0
devops-cli-service commentedon Nov 22, 2026
Live since 2026-11-22 23:51 UTC