New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: migrate from master branch to main #8663
chore: migrate from master branch to main #8663
Conversation
needs branch protection added for main, should be doable before exists |
This is not strictly necessary according to: https://github.com/github/renaming/blob/main/README.md#renaming-existing-branches |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming you used search and replace ;)
I used the search function in VS Code, with the following settings: Search for string I've deliberately not touched any files in |
GitHub will migrate the branch protection rules automatically if you're doing the migration from |
c755585
Merged the latest |
@HonkingGoose This looks ready for merge, right? But it should be manually merged by @rarkins, as there are manual steps to follow. |
@JamieMagee Yeah I think this is ready for final review and merge. The main idea, I think, would be to freeze everything, turn off all the bots, and migrate via GitHub interface, merge this PR, confirm tests work, and then enable bots one by one, with the Semantic Release bot as the last one to be re-enabled. Proposed steps:
|
That sounds like a comprehensive migration plan. Could I suggest one more thing: can we try this on one of the other repos first as a test run for the main renovate repository? |
Not sure semantic release needs to be turned off as long as we don't add any release-triggering commits to master/main? And yes maybe let's do all the smaller repos first and finish with this one. |
Good idea! It's probably safer to try the smaller repos first, see if we've got all things covered, and as the last step migrate the main renovate repository.
I'm trying to make sure that we don't create releases unnecessarily. But if we don't use any EDIT: Also maybe we should turn of the Renovate auto-approve bots while we're migrating to |
Time to do the other repos, followed by this one? |
Semantic-release bot does not support a main branch by default yet. So we need to configure the branch manually. I've copy/pasted the config from: https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#name and adapted it to use a main branch.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
i think the v25 release will be a good point to switch to |
I've merged the latest changes from I've fixed the "bad merge" in the This should be OK again, but please check my work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs update, maybe deconflicting 😉
new step popped up: git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a |
🎉 This PR is included in version 25.1.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Well that went smoothly! The build still works, the semantic release bot kept humming along, and things were fine. 😄 🎉 ✨ ✨ ✨ Thank you @viceice, @rarkins and @JamieMagee for the reviews, tips and suggestions to get this landed. ❤️ |
Changes:
master
->main
for CIrenovatebot/renovate master
to point torenovatebot/renovate main
insteadReally rough draft to get an idea of the changes needed to migrate from
master
tomain
on this repo.Maybe @rarkins can make a complete copy of this repo somewhere safe and try this out, and see where stuff breaks.
I have not tested this myself yet, as I would need to replicate the full setup that this repository has somehow (external bots, branch protection rules, semantic release bot, etc.)
I have also not replaced any mentions of
master
in thedocs/usage
section or in any fixtures or snapshots, as that pertains to the code of Renovate bot itself and what branches the bot supports on specific platforms.Context:
Explore what changes we would probably need to migrate from
master
tomain
as the default branch on therenovatebot/renovate
repository.Closes #8153.
Also for more information read: https://github.com/github/renaming
GitHub docs also has some guidance on how to rename a branch from the interface as admin: https://docs.github.com/en/github/administering-a-repository/renaming-a-branch
Checklist:
GitHub should do the following for us automatically:
master
to point tomain
main
instead ofmaster
master
What we need to do before migrating:
main
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: