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.
https://circleci.com/docs/2.0/orb-author/#orb-development-kit
MIT License
24 stars 34 forks source link

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

Open at-ishikawa opened 3 years ago

at-ishikawa commented 3 years ago

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:

FelicianoTech commented 3 years ago

@CircleCI-Public/cpeng

gmemstr commented 3 years ago

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.

nbialostosky commented 3 years ago

@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?

gmemstr commented 3 years ago

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

netcazean commented 3 years ago

29

netcazean commented 3 years ago

9