:four_leaf_clover: `Proposal`: Plugin `github-repo-scaffolding-golang` Enhancement (sub-task of #513)
What would you like to add? Why is this needed?
See #513 for the details
Background
Current config:
tools:
- name: github-repo-scaffolding-golang
instanceID: default
dependsOn: []
options:
owner: YOUR_GITHUB_USERNAME
org: YOUR_ORGANIZATION_NAME
repo: YOUR_REPO_NAME
branch: main
image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY
The biggest issue I have with it is that the config example is a bit confusing. Why put both "org" and "owner" at the same time? In fact, only one is required, but from the sample config, it's not straightforward until you read all the comments.
Another issue is the "image_repo" part, what does image repo have anything to do with GitHub repo scaffolding?
Proposals
- better documentation, usage example, so that users know what exactly each parameters are
- better param naming
- maybe put org/owner in a more clear way.
Example:
org: yes (default no)
owner: name(can be the name of the owner or the org)
repo: xxx
Not the best idea, but maybe it's more clear.
A better design is needed here.
Be Brave, Be Imaginative
Anything that isn't following the clean code best practice, refactor it.
Any feature you think would add value to end-users, add it.
Any configuration refactors / documentation updates that would improve the end users' quality of life, do it.
Be brave when deleting unnecessary code, and be imaginative when adding new features.
I want to try it. @daniel-hutao @IronCore864 Only for org and owner fields, my thoughts following:
- remove
organdownerfileds, add newuserfiled.
This is because github username is a unique identifier, it can only be an authorized user or an organization. We can identify its type internally, then call the github restful interface to create a repository. With the help of UsersService.Get interface, it is easy to know whether it is a user or an org.
Hi, @tryturned I'm really sorry to reply to you so late. This plugin has been refactored. Should we close this issue now? @IronCore864