-
Notifications
You must be signed in to change notification settings - Fork 113
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
feat(git-node): add release promotion step #835
base: main
Are you sure you want to change the base?
Conversation
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
Thanks for working on this! I will try it the next time I make a release. |
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
What's missing to have it landed? |
@targos said he wanted to give it a shot, so I'm fine waiting on his input – but also fine landing it if folks think it's ready to land. |
So, I gave a shot today for v22.9.0 and something got wrong. It conflicts (as expected) but on v22.x-staging branch instead of
|
So it created 2 release commits,
|
It expects |
It was null
|
Oh! My bad, I didn't test that case, tbh I thought |
So I tried reproducing by removing the setting for the branch name, and I immediately got an error: $ git node release -S --promote https://github.com/nodejs/node/pull/54966
⚠ You have not told git-node what branch you are trying to land commits on.
--------------------------------------------------------------------------------
ℹ For example, if your want to land commits on the `main` branch, you can run:
$ ncu-config set branch main
--------------------------------------------------------------------------------
Error: Failed to create new session
at new Session (file:///…/node-core-utils/lib/session.js:27:15)
at new ReleasePromotion (file:///…/node-core-utils/lib/promote_release.js:22:5)
at main (file:///…/node-core-utils/components/git/release.js:127:21)
… Did you modify that check locally maybe? You should not be able to proceed with an empty value. |
I did not. I have just Actually, I found why. I normally use a local ncu configuration and it was set to v22.x-staging indeed. Can we automatically change it to |
So, I tried the command for v20.18.0. Unfortunately, I didn't go far. At some point it tried to update my local staging branch from upstream but it was already pushed in an earlier step (the manual one, since I ran in dry-run mode by mistake, but the dry-run had already created the tag so it wasn't completely dry).
|
FWIW you can delete the local tag as long as you haven't pushed it.
It looks like it thinks the default branch is |
It is v20.x-staging, which is normal from my pov. I work on a v20.x release in my v20.x workspace |
Does it need to be |
I believe it's for backport PRs, but I'm not sure. |
I've confirmed that to land a (backport or not) PR to a staging branch, NCU request you to set a different branch in your config. I've updated the promotion script to make an API call to get the name of the default branch instead of relying on the config. |
You can try it with
git node release -S --promote https://github.com/nodejs/node/pull/53945
.Supersedes #402
/cc @nodejs/releasers