-
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
Conversation
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
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. |
I've tried it with the v18.20.5 release, and did not get any blocker. I'm tempted to land it, we might still want to iterate on it but I think it's at a point where we can rely on it. @nodejs/releasers, wdyt? |
LGTM |
Refs: nodejs/node-core-utils#835 PR-URL: #55835 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/node-core-utils#835 PR-URL: nodejs#55835 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/node-core-utils#835 PR-URL: nodejs#55835 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/node-core-utils#835 PR-URL: #55835 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/node-core-utils#835 PR-URL: #55835 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
You can try it with
git node release -S --promote https://github.com/nodejs/node/pull/53945
.Supersedes #402
/cc @nodejs/releasers