OpenAPITools / OpenAPITools/openapi-generator
[REQ][Go] Make the default branch for git_push script configurable
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
The default git_push script has hardcoded the origin branch as "master". Many repos these days have switched to using "main" as the default branch name now, which makes the git_push script unusable without running a sed.
Describe the solution you'd like
Please add a config option to change the default branch of the git_push script to anything, such as "main".
Describe alternatives you've considered
N/A
Additional context
The relevant mustache file is here: modules/openapi-generator/src/main/resources/go/git_push.sh.mustache
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading modules/openapi-generator/src/main/resources/go/git_push.sh.mustache and inspect nearby generator configuration conventions. The change is complete when the generated git_push script uses a configurable default branch instead of hardcoded master, allowing values such as main without a sed edit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go, shell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100