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. |
There was a problem hiding this comment.
IMHO, teams should be available too.
| 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
|
During testing in copilot cli I have answered all quesrions. Then during repo creation it wrotes that SAML is needed and process ended with note - call skill again from step 1. |
|
After creation a new repo 1st chore PR landed. |
|
When got this queastion: "Which absa-group project(s) should this be linked to? Enter project number(s), or press Enter to skip." - The enter is not accepted. |
|
Thanks for the review, I want to reply to several of your questions.
I do not understand the whole question. But the point is, that we have a dependabot in the repository template, but the workflows that are being copied have outdated version during the time. So the first step, what happens is that dependabot creates a PR, that updates all the versions. The auto-approve auto-merge is not possible since it would be also copied and manual updating of the template is time-to-time, but nothing regular.
Change made in commit: 4b233ae
The skill no longer restarts from step 1 on a SSO failure. It should re-print the full plan plus a note saying which step failed. |
So we are missing dependabot in template dir to keep these versions up to date? |
| | Guide | Description | | ||
| |----|----| | ||
| | [PR Review](./pr-review.md) | How the PR review skill works, what sections it applies, and how to trigger it | | ||
| | [Create Repository](./create-repository.md) | Creating a new AbsaOSS/absa-group repo from the template with standard guardrails | |
There was a problem hiding this comment.
- Is the skill limited just to these two organizations?
- If it is - it is well described.
- If it is not the intention, then there is a gap - at least the access to cps-* template repo.
- The skill is in OSS repo, so the skill should support 3rd party organizations. But it can just my feeling.
There was a problem hiding this comment.
The skill is limited only for our two GH organizations (absa-group and AbsaOSS). Understand your point, but the whole skill/interview is precisely made for creation of the Absa repositories. This skill is for the Absa CPS ecosystem. We choose the OSS, because it does not store any intern information. There are some colleagues that use their own laptops to work also on the OSS repos, so it can be used in that scenario for example.
There was a problem hiding this comment.
There is option also to rename the whole skill to be /create-absa-repository.
There was a problem hiding this comment.
No, keep it as it is. The future will show us if change will be needed. Comment resolved, kept open.
I already answered with previous answer. We have the dependabot in the template, but the versions there are being outdated in the time. So logically first thing what happens is that the dependabot wants to update all of them. If we are not on the same page, we can have a call about that. |
| | Guide | Description | | ||
| |----|----| | ||
| | [PR Review](./pr-review.md) | How the PR review skill works, what sections it applies, and how to trigger it | | ||
| | [Create Repository](./create-repository.md) | Creating a new AbsaOSS/absa-group repo from the template with standard guardrails | |
There was a problem hiding this comment.
No, keep it as it is. The future will show us if change will be needed. Comment resolved, kept open.
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