jhipster-online: Generator Maintainence Branch (v6) is not using Main
So this one needs to go into v6 maintenance branch I think as otherwise jhipster-online wouldn’t work property when creating PRs as it tries to create pull requests and merge them with the main branch.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- refactor: rename master branch to main in the 6.x maintenance branch This is needed for jhispter-online to work correctly as jhipster-online is already migrated to main branch Resolves https://githu... — committed to SudharakaP/generator-jhipster by SudharakaP 4 years ago
- feat: change the generated projects default branch name to main This renames the default branch of the generated project to main Resolves https://github.com/jhipster/jhipster-online/issues/258 — committed to SudharakaP/jhipster-online by SudharakaP 4 years ago
- feat: change the generated projects default branch name to main This renames the default branch of the generated project to main Resolves https://github.com/jhipster/jhipster-online/issues/258 — committed to SudharakaP/jhipster-online by SudharakaP 4 years ago
- feat: change the generated projects default branch name to main (#259) This renames the default branch of the generated project to main Resolves https://github.com/jhipster/jhipster-online/issues/... — committed to jhipster/jhipster-online by SudharakaP 4 years ago
@SudharakaP I get that error when I try to apply a JDL to a repository with a
masterbranch instead of amainbranch (https://github.com/ruddell/jhipsterSampleApplication). It works if I push amainbranch then try to apply the JDL.Maybe we should use the repository’s default branch rather than
main?You can call
getDefaultBranch()on theGHRepositoryorGitlabProject, for example: https://github.com/ruddell/jhipster-online/commit/60a264629daa702eefbb5b772775c9fc68a1c336. I did not test this since I don’t have a local dev config set up for this project.Another solution would be to let JHipster Online to rename the branch before pushing:
git branch -m master mainOh ok, now I understand ! The code is here: https://github.com/jhipster/generator-jhipster/blob/be2553b1fd333d53400859e2d68c2ea69b86ecce/generators/app/index.js#L501
It should be something like that instead:
git init --initial-branch=mainThanks for your PR @SudharakaP but sorry for asking it, I don’t understand how it can fix the issue
Currently, when I generate a JHipster project with JH Online, it’s still with main branch
on phone right now, I can work on new PR for v6.x_maintenance branch tomorrow. I can’t merge it, as it contains some Vue file