Story
As a org admin,
I want create an empty petry-projects/repo-template repository and flag it as a GitHub template repository with the standard general settings applied,
so that new repos can be scaffolded with one "Use this template" click instead of a manual copy-from-standards runbook.
Acceptance Criteria
- petry-projects/repo-template exists and
gh repo view petry-projects/repo-template --json isTemplate returns isTemplate: true.
- The repo has a default
main branch and the standard general settings applied (squash-only merge with merge/rebase disabled, delete-branch-on-merge, auto-merge enabled) — because a template click copies files only, not settings.
- The repo is empty of product scaffold content (the verbatim scaffold lands in the Phase 1 scaffold story); only an initial commit / placeholder README is present.
- Repo creation and the
is_template flag are set with an org-admin classic PAT (not the Actions GITHUB_TOKEN), and the who/when of the action is recorded for auditability.
- No activation label (e.g.
initiative:auto) is applied to the repo or this work.
Tasks / Subtasks
Dev Notes
- Hands-off: creating an org repo and setting
is_template requires org-admin and a classic PAT; the Actions GITHUB_TOKEN / dev-lead cannot create org repos or change security_and_analysis. scripts/apply-repo-settings.sh documents that a classic PAT with repo scope is required and OAuth app tokens are rejected by the check-suites API.
- GitHub template repos copy files + (optionally) branches with UNRELATED history only — they do NOT carry settings, branch protection, rulesets, required checks, labels, secrets, or security config. That non-file gap is closed by the Phase 2 bootstrap, not here.
- Pick the org default visibility and note it; do not apply
initiative:auto or any activation label (apply-plan.sh enforces this for issues, and the same inert-by-default discipline applies to the new repo).
Project Structure Notes
This story operates on a new external repo, not on files in .github-private. Settings are applied by reusing the existing scripts/apply-repo-settings.sh against the new target.
References
Likely target surface
scripts/apply-repo-settings.sh
Story prepared by the BMAD Scrum Master (Bob) for epic #964. Status: ready-for-dev.
Story
As a org admin,
I want create an empty petry-projects/repo-template repository and flag it as a GitHub template repository with the standard general settings applied,
so that new repos can be scaffolded with one "Use this template" click instead of a manual copy-from-standards runbook.
Acceptance Criteria
gh repo view petry-projects/repo-template --json isTemplatereturns isTemplate: true.mainbranch and the standard general settings applied (squash-only merge with merge/rebase disabled, delete-branch-on-merge, auto-merge enabled) — because a template click copies files only, not settings.is_templateflag are set with an org-admin classic PAT (not the Actions GITHUB_TOKEN), and the who/when of the action is recorded for auditability.initiative:auto) is applied to the repo or this work.Tasks / Subtasks
gh repo create petry-projects/repo-templateat the org default visibility) and setis_templateviagh api -X PATCH repos/petry-projects/repo-template -f is_template=true. (AC: test issue from agent #1)scripts/apply-repo-settings.sh petry-projects/repo-templateso the template repo itself is compliant. (AC: Go-live improvements for PR review agent #2)Dev Notes
is_templaterequires org-admin and a classic PAT; the Actions GITHUB_TOKEN / dev-lead cannot create org repos or changesecurity_and_analysis.scripts/apply-repo-settings.shdocuments that a classic PAT withreposcope is required and OAuth app tokens are rejected by the check-suites API.initiative:autoor any activation label (apply-plan.sh enforces this for issues, and the same inert-by-default discipline applies to the new repo).Project Structure Notes
This story operates on a new external repo, not on files in .github-private. Settings are applied by reusing the existing scripts/apply-repo-settings.sh against the new target.
References
Likely target surface
scripts/apply-repo-settings.shStory prepared by the BMAD Scrum Master (Bob) for epic #964. Status: ready-for-dev.