From a local checkout:
npm ci
npm run verify
pi install /absolute/path/to/pi-github-adminRestart Pi if the extension was installed while a session was running. Confirm registration by locating github_get_auth in the available tools.
For interactive use, run gh auth login; for CI, provide a least-privileged GITHUB_TOKEN. Then call:
github_get_auth({ "repo": "T50-Systems/pi-github-admin" })Do not continue to mutation until repository permissions are understood.
github_ship_repo composes metadata, labels, milestones, issues, protection, release, and verification. Start offline:
github_ship_repo({
"repo": { "owner": "example-org", "name": "example-service", "visibility": "private", "dryRun": true },
"metadata": { "description": "Example service", "topics": ["example"] },
"labels": [{ "name": "roadmap", "color": "5319e7", "description": "Planned work" }],
"milestones": [{ "title": "Foundation", "description": "Initial delivery" }],
"issues": [{ "title": "Document operations", "body": "Add runbook.", "labels": ["roadmap"], "milestone": "Foundation" }],
"branchProtection": { "branch": "main", "requirePullRequest": true, "requiredApprovals": 0 },
"verify": { "checks": ["metadata", "labels", "milestones", "issues", "branch_protection"], "branch": "main" },
"dryRun": true
})Review the plan, remove dryRun only with explicit approval, and verify actual state afterward.
- Read the PR and select an existing issue when applicable.
- Add traceability with
github_link_pr_issuesusingrefsunless merge should close the issue. - Inspect
github_get_pr_checks. - Merge with
github_merge_pr_when_readyonly after checks and mergeability are acceptable. - Delete a branch separately with
github_delete_branchwhen a reviewed cleanup is needed.
Automated tests should use dry runs and mocks, not live repositories. A manual integration smoke test must use a disposable repository and a short-lived token. Recommended preflight:
npm ci
npm run verify
npm audit --audit-level=high
npm pack --dry-runSee docs/OPERATIONS.md for recovery and SECURITY.md for credential handling.