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

Most upvoted comments

@SudharakaP I get that error when I try to apply a JDL to a repository with a master branch instead of a main branch (https://github.com/ruddell/jhipsterSampleApplication). It works if I push a main branch then try to apply the JDL.

Maybe we should use the repository’s default branch rather than main?

You can call getDefaultBranch() on the GHRepository or GitlabProject, 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 main

Oh 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=main

Thanks 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