Orb-Project-Template icon indicating copy to clipboard operation
Orb-Project-Template copied to clipboard

Allow to set the default branch on `circle orb init`

Open at-ishikawa opened this issue 4 years ago • 6 comments

Orb version:

What happened:

The job orb-tools/dev-promote-prod-from-commit-subject on integration-test_deploy workflow on Circle CI configuration doesn't work for the new repository, because since October 1, GitHub allows developers to set default branch, and the default value of it is main, not master.

Expected behavior:

circleci orb init allows us to set the default branch.

Additional Information:

at-ishikawa avatar Oct 09 '20 22:10 at-ishikawa

@CircleCI-Public/cpeng

FelicianoTech avatar Oct 11 '20 01:10 FelicianoTech

orb init assumes your repository is completely empty, without any branches or content, and initialises both the master and alpha branches. I think being able to specify an alternatively default branch would be nice during this process, but I don't see it high on the priority list myself.

gmemstr avatar Oct 13 '20 13:10 gmemstr

@gmemstr Now that GitHub is defaulting all new repositories to main instead of master do we think this issue has a higher priority now? https://github.blog/changelog/2020-10-01-the-default-branch-for-newly-created-repositories-is-now-main/

Or at the very least can we make any updates to handle both master and main?

nbialostosky avatar Jan 12 '21 19:01 nbialostosky

@nbialostosky We do account for it in this template now, but I'll get the ball rolling on choosing during the setup process soon - still unsure about switching the default but there's a good chance it could happen :)

gmemstr avatar Jan 15 '21 16:01 gmemstr

#29

netcazean avatar Sep 07 '21 18:09 netcazean

#9

netcazean avatar Sep 07 '21 19:09 netcazean