feat: /create-repository#34
Conversation
…l' into feature/repository-creation-skill # Conflicts: # skills/create-repository/SKILL.md
…l' into feature/repository-creation-skill
|
|
||
| Run `gh auth status`. If it exits non-zero, **stop immediately** and tell the user: | ||
|
|
||
| > This skill needs an authenticated GitHub CLI with org-admin permissions for AbsaOSS / absa-group. |
There was a problem hiding this comment.
I am not sure if the permissions that are needed are org-admin, its really high permission category.
| ### 4. Code owners (OSS repos only, ≥1 user) | ||
|
|
||
| **Only ask this for open source (`AbsaOSS`) repos.** Internal (`absa-group`) repos keep the template's | ||
| empty `CODEOWNERS`. An always-on org-level ruleset **prohibits committing straight to the default branch** |
There was a problem hiding this comment.
Why is the CODEOWNERS file for internal repositories empty in this step?
There was a problem hiding this comment.
It is because CSO team added to every internal repository a mandatory Check appid.json file workflow, that is added automatically. But they did not think about option to merge a commit straight without PR. So when we try to modify CODEOWNERS directly, the appid.json check is pending and the change is not possible without PR.
| If the `Write a different set of code owners` option is chosen, ask: "Enter the GitHub usernames for | ||
| the code owners." | ||
|
|
||
| A single global `CODEOWNERS` rule covers all files. Individuals only — no teams. |
| gh api -X PATCH repos/{owner}/{name} -F delete_branch_on_merge=true | ||
| ``` | ||
|
|
||
| 8. Link the repository to project number {number} (https://github.com/orgs/absa-group/projects/{number}). ← private repos only (one block per project); omit otherwise |
There was a problem hiding this comment.
I think it should automatically ask for adding the scope if the user token doesn't have it:
gh auth refresh -s read:project
There was a problem hiding this comment.
IMO, this skill should do only repository creation scoped commands. If person does not have permission to add it to the absa-group project, then someone with correct permission should do it instead.
This command is refreshing existing login token and requesting extra permission, which can be overlooked by skill user and cause not wanted outcomes.
| | Core Branches ruleset | ✓ | | ||
| | Auto-delete branches on merge | ✓ | | ||
|
|
||
| Template: https://github.com/absa-group/cps-repository-template |
There was a problem hiding this comment.
I am missing the information in this summary about which files are copied from the template repository. I think it can be useful for the user to know exactly what he created.
There was a problem hiding this comment.
You are right, I added under Template another row called: Files copied from the template. See commit: d395a5d
Overview
This pull request introduces the new
create-repositoryskill, which automates the creation and configuration of GitHub repositories under the AbsaOSS (open source) or absa-group (internal) organizations. The skill runs an interactive interview, generates an annotatedghcommand plan, and executes it upon user confirmation, ensuring that all standard settings, labels, rules, and project links are applied consistently. The PR also adds robust documentation, a reusable ruleset asset, and evaluation scenarios to guide and test the skill.Key Changes
Related
Closes #https://github.com/absa-group/cps-organizational/issues/36