OpenAPITools / OpenAPITools/openapi-generator

[REQ][Go] Make the default branch for git_push script configurable

Open
#19,995 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.