Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

feat: change default branch from master to main #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: change default branch from master to main #36

wants to merge 1 commit into from

Conversation

kuwas
Copy link
Contributor

@kuwas kuwas commented Sep 1, 2020

Change default branch from master to main.

References

@kuwas kuwas requested a review from a team as a code owner September 1, 2020 17:05
@kuwas
Copy link
Contributor Author

kuwas commented Sep 1, 2020

@npm/eng @nlf In order for the checks to pass, a main branch has to be created from master and pushed.

git checkout master
git checkout -b main
git push origin main

@kuwas
Copy link
Contributor Author

kuwas commented Sep 1, 2020

After discussing with @nlf, I have removed changes to .github/settings.yml to prevent this PR from making changes that will impact npm repos that extend that file.

@sapieneptus
Copy link

@kuwas Would you mind giving a summary of what changes we can expect / what other changes need to be made for repos in this org once this PR is merged?

@kuwas
Copy link
Contributor Author

kuwas commented Sep 2, 2020

@sapieneptus For sure.

  • For the .github/workflows/*.yml file changes
    • These should affect only this repo
  • For the actions/default/action.yml file change
    • This is only a comment change and should have no effects
  • For the cloud.js and npm.js file changes
    • These will affect any repo with the npm package https://www.npmjs.com/package/@npmcorp/.github as a dependency and are using semantic-release for automated release
    • For the affected repos, the @npmcorp/.github package needs to be updated to v0.5.0, once this is merged and released to the npm registry. Their master branch needs to be renamed to main and any other CI/CD pipelines needs to be updated to use main as the new default branch.
  • For the branch renaming changes
    • This will affect all repos currently referencing npm/.github/actions/default@master in any GitHub Actions workflows, if master is deleted from this repo after
    • It is still recommended to change all references of npm/.github/actions/default@master to npm/.github/actions/default@main or npm/.github/actions/[email protected]
  • For this PR and repo
    • A main branch has to be created off of master and pushed
    • The main branch has to be set to be the default branch of this repo
    • The master branch should be kept for backward compatibility

@smeirsha
Copy link

smeirsha commented Sep 6, 2020

@Soph @nlf correct me if I am wrong this isn't a small item? We will need to carefully change all the repos and CI/CD?

Copy link
Contributor

@radiantspace radiantspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to plan several stages for this change. Before this change, only repos with master branch will run those template integrations, after the change - only those with main. So i think we need to:

  1. First, change the template integrations to fire of both branches (master and main)
  2. Make the changes to all the repos in npm org (the feature @smeirsha mentioned)
  3. Eventually remove the master branch reference from .github templates

@smeirsha
Copy link

smeirsha commented Sep 6, 2020

@radiantspace Yeah we need to prioritize this work against everything else we are working on, this isn't something we can just push.

@sapieneptus
Copy link

Created a feature request

@sapieneptus
Copy link

@kuwas If you're aware of any internal timeline goals for the rename (or additional details/context I might have missed), feel free to add them to the feature request item.

@kuwas
Copy link
Contributor Author

kuwas commented Sep 7, 2020

@sapieneptus I cannot see that repo, since it is private. I believe the timeline for GitHub to support main as the default branch for new repos is October 1st: https://github.com/github/renaming#on-october-1-2020-newly-created-repositories-will-default-to-main

@smeirsha
Copy link

smeirsha commented Sep 7, 2020

@kuwas I believe that this isn't considered a new repository and this will default into the existing ones e.g. by the end of the year. cc @sapieneptus @ethomson

@kuwas
Copy link
Contributor Author

kuwas commented Sep 8, 2020

@smeirsha Yes that is true.

What I'm referring to is the semantic-release config changes that are apart of this PR, these will be required by new repos that are depending on the npm packaged published by this repo. When the main branch change is applied, other organizations will no longer be able to create new repos depending on this npm package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants