Migrate ALL providers to expecting main branch, not just GitHub, and announce the change
See original GitHub issueThe work done in https://github.com/jupyterhub/binderhub/pull/1172 means that binderhub now looks for the main
branch if a ref isn’t provided, rather than master
. This is probably a change we should roll out across all providers but I, at least, am unfamiliar with where these other communities are in this process and this change will be breaking previously established behaviour, possibly disrupting a lot of users. Therefore, I think we should have some form of “announcement” (blog post, twitter thread…) ready to go when we do make this change, just so users aren’t blind-sided and they can find information on how to fix their links.
Note: This change does not affect gists over which the user has no control of the ref naming.
TODOs
- Draft a blog post/twitter thread to announce the change
- Change the behaviour of the
placeholder
variable added in PR #1172
placeholder = "main";
if (provider === "gist") {
placeholder = "master";
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Issue with migrating master -> main #1145 - GitHub
We have recently moved the master branch to main on all the Bokeh repos ... Migrate ALL providers to expecting main branch, not...
Read more >GitHub to replace master with main starting in October
As GitHub does its thing, the most important steps you can take is migrate the default branch of all your projects from “master”...
Read more >Git: Moving from Master to Main | R-bloggers
In June 2020, GitHub announced that is was moving the default branch name from master to the more neutral name, main.
Read more >The new Git default branch name - GitLab
Every Git repository has an initial branch, which is the first branch to be ... via the GitLab GUI will use main as...
Read more >Sunsetting Atom - The GitHub Blog
We are archiving Atom and all projects under the Atom organization for an official sunset on December 15, 2022.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Take a look at #843 which was closed by #895. Maybe we can hoist this out of the Git repo provider and use it for GitHub and GitLab as well?
Yes, this is related to #895 which also uses ls-remote to resolve refs. The addition of
--symref HEAD
is what lets us find the branch name associated with HEAD.But this is even easier than I thought! HEAD is already a valid ref, so it’s working already and we should just make our default ref HEAD instead of a branch name, and our existing APIs already work:
https://mybinder.org/v2/gh/binderhub-ci-repos/requirements/HEAD
This is strictly better than resolving the default branch name and using that in the URL, because it allows creating a stable link that will work across default branch changes without changes to the link.
Need to test with all providers, but I think it’ll work.