CircleCI-Archived / Orb-Project-Template

A starter template for orb projects. Build, test, and publish orbs automatically on CircleCI. Use the Orb Development Kit to get started.

Home Page:https://circleci.com/docs/2.0/orb-author/#orb-development-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

at-ishikawa opened this issue · 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:

@CircleCI-Public/cpeng

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 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 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 :)