45 Commits

Author SHA1 Message Date
Antoine du Hamel
6322071efe tools: improve log output of create-release-proposal
PR-URL: https://github.com/nodejs/node/pull/61028
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-12-14 11:26:36 +00:00
Antoine du Hamel
3c248c3556 tools: fix linter for semver-major release proposals
PR-URL: https://github.com/nodejs/node/pull/60481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-11-01 07:11:01 +00:00
Antoine du Hamel
fdcf4d9454 tools: fix failing release-proposal linter for LTS transitions
PR-URL: https://github.com/nodejs/node/pull/60465
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-10-30 17:29:10 +00:00
Antoine du Hamel
0a46aa9e5d tools: add script to make reviewing backport PRs easier
PR-URL: https://github.com/nodejs/node/pull/59161
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-08-26 22:49:24 +00:00
Antoine du Hamel
38c2b926af tools: add support for URLs to PR commits in merge.sh
PR-URL: https://github.com/nodejs/node/pull/59162
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-07-24 09:44:33 +00:00
Antoine du Hamel
4dafa7747f tools: ignore CVE mention when linting release proposals
PR-URL: https://github.com/nodejs/node/pull/59037
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-07-13 19:45:02 +00:00
Antoine du Hamel
3a7f8efe60 tools: improve release proposal linter
PR-URL: https://github.com/nodejs/node/pull/58647
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2025-06-11 15:02:35 +00:00
Antoine du Hamel
99dc2d376a tools: add semver-major release support to release-lint
Co-authored-by: RafaelGSS <rafael.nunu@hotmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57892
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-04-21 06:33:57 +00:00
Elves Vieira
958fd912d5 tools: edit create-release-proposal workflow to handle pr body length
PR-URL: https://github.com/nodejs/node/pull/57841
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-14 12:54:17 +00:00
Antoine du Hamel
d5b3dbb0f5 tools: do not use temp files when merging PRs
PR-URL: https://github.com/nodejs/node/pull/57790
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-10 22:37:31 +00:00
Antoine du Hamel
7409a1dcc4 tools: edit create-release-proposal workflow
Small cleanup edits.

PR-URL: https://github.com/nodejs/node/pull/56540
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-11 22:55:07 +00:00
Antoine du Hamel
e1df1e061e tools: validate commit list as part of lint-release-commit
PR-URL: https://github.com/nodejs/node/pull/56291
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-09 22:07:53 +00:00
Antoine du Hamel
821ab6ff30 tools: add release line label when opening release proposal
PR-URL: https://github.com/nodejs/node/pull/56317
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2024-12-21 15:29:41 +00:00
Antoine du Hamel
80c0055e38 tools: use commit title as PR title when creating release proposal
PR-URL: https://github.com/nodejs/node/pull/56165
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2024-12-09 11:10:51 +00:00
Antoine du Hamel
4f51d461d1 tools: improve release proposal PR opening
- Open as draft. The releaser should review the PR and mark it as ready.
- Add the "release" label.
- Assign the releaser to the PR so it's clearer who's in charge and
  they can find it more easily. This will also notify and subscribe
  them to the PR.

PR-URL: https://github.com/nodejs/node/pull/56161
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-12-08 19:34:31 +00:00
Antoine du Hamel
60e9c6f441 tools: update create-release-proposal workflow
PR-URL: https://github.com/nodejs/node/pull/56054
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-12-05 20:33:44 +00:00
Rafael Gonzaga
c75aaac733 build: add create release proposal action
PR-URL: https://github.com/nodejs/node/pull/55690
Refs: https://github.com/nodejs/security-wg/issues/860
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-11-23 16:48:46 +00:00
Nathan Baulch
0f375db9c6 tools: fix typos
PR-URL: https://github.com/nodejs/node/pull/55061
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-15 13:59:49 +00:00
Antoine du Hamel
13d6950a6c tools: add util scripts to land and rebase PRs
PR-URL: https://github.com/nodejs/node/pull/54656
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2024-09-06 09:08:24 +02:00
Aviv Keller
53483a1344 meta: use HTML entities in commit-queue comment
PR-URL: https://github.com/nodejs/node/pull/53744
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-08 16:29:43 +00:00
Antoine du Hamel
3fe35dc5af Revert "tools: add --certify-safe to nci-ci"
This reverts commit 0fa07d4442.

PR-URL: https://github.com/nodejs/node/pull/53098
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-05-24 09:47:50 +00:00
Matteo Collina
0fa07d4442 tools: add --certify-safe to nci-ci
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/52940
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-05-12 06:33:11 +00:00
Antoine du Hamel
a3874dd637 tools: fix request-ci-failed comment
PR-URL: https://github.com/nodejs/node/pull/45291
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2022-11-03 02:14:40 +00:00
Antoine du Hamel
1422e51a5b tools: fix request-ci-failed comment
Refs: https://github.com/nodejs/node/pull/45209#issuecomment-1294239904
PR-URL: https://github.com/nodejs/node/pull/45218
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2022-10-28 11:45:35 +00:00
Feng Yu
b6c6cc7000 tools: update main branch name
PR-URL: https://github.com/nodejs/node/pull/43440
Refs: https://github.com/nodejs/node/issues/33864
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-06-17 08:48:18 +01:00
Xuguang Mei
8f07452206 tools: fix skip PR if CI is still running
resolve: https://github.com/nodejs/node/issues/40330

PR-URL: https://github.com/nodejs/node/pull/42377
Fixes: https://github.com/nodejs/node/issues/40330
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Mestery <mestery@protonmail.com>
2022-03-21 04:33:11 +00:00
Rich Trott
5f07d00c60 tools: remove last of error-masking in commit-queue.sh
Remove the lats of the unintentional error-masking in commit-queue.sh.

With this change, `tools/lint-sh.js . --from-npx` at last passes.

PR-URL: https://github.com/nodejs/node/pull/41356
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-01-01 17:25:36 +00:00
Rich Trott
e7a924e086 tools: do not mask errors on multiple commit retrieval
In commit-queue.sh, the assignment to `commits` will succeed and the
script will continue if one of the two `git` commands fails, even with
`-e` set. Split it into three separate assignments so that failures in
the `git` commands will be clearly logged and cause the script to exit
with a failure status code.

PR-URL: https://github.com/nodejs/node/pull/41340
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2021-12-30 05:57:57 +00:00
Rich Trott
67cd4a61ac tools: simplify commit-queue.sh merge command
The mergeUrl() function is only used in one place. It's a one-liner and
inlining it makes the script easier to understand, I think. It also
means no future shellcheck complaints about needing to add error
handling.

PR-URL: https://github.com/nodejs/node/pull/41314
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2021-12-27 14:48:07 +00:00
Rich Trott
5cc4b69fd4 tools: be intentional about masking possible error in start-ci.sh
Revise start-ci.sh to conform with shellcheck 0.8.0 default checks.

Refs: https://www.shellcheck.net/wiki/SC2312

PR-URL: https://github.com/nodejs/node/pull/41284
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-12-24 19:25:06 +00:00
Michaël Zasso
873119385f tools: simplify and fix commit queue
Use `gh` CLI for CI and commit queue jobs, and use the correct token
to merge PRs.

PR-URL: https://github.com/nodejs/node/pull/40742
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-11-07 15:26:45 +01:00
Antoine du Hamel
96e00e03cf tools: ensure the PR was not pushed before merging
When using Squash and Merge feature, it would allow to a malicious
actor to push unreviewed code to their PR while the CQ is running and
bypass the usual checks.
This commit adds a check to refuse to land if the head of the PR
branch is different from the one validated by ncu.

PR-URL: https://github.com/nodejs/node/pull/40747
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-11-07 12:08:22 +01:00
Antoine du Hamel
80b8440656 tools: use GitHub Squash and Merge feature when using CQ
PR-URL: https://github.com/nodejs/node/pull/40666
Refs: https://docs.github.com/en/rest/reference/pulls#merge-a-pull-request
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-11-06 08:14:25 +00:00
Antoine du Hamel
9bd6d526e6 tools: abort CQ session when landing several commits
Most PRs are meant to be squashed in one commit when landing. If the
collaborator hasn't been using `fixup!` commits, the CQ lands the PR
as several commits. This change makes the CQ abort by default
when attempting to land several commits, unless there's another
label added to the PR to force squashing or landing as several commits.

Fixes: https://github.com/nodejs/node/issues/40436
Refs: https://github.com/nodejs/node-core-utils/pull/572

PR-URL: https://github.com/nodejs/node/pull/40577
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-11-01 21:02:52 +01:00
Antoine du Hamel
240c8bc190 tools: avoid crashing CQ when git push fails
PR-URL: https://github.com/nodejs/node/pull/36861
Reviewed-By: Mary Marchini <oss@mmarchini.me>
2021-06-11 07:59:49 +00:00
bl-ue
5e5bb69338 tools: fix typo in commit-queue.sh
PR-URL: https://github.com/nodejs/node/pull/39000
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-06-11 06:02:23 +00:00
Antoine du Hamel
0e96dc1f95 tools: lint shell scripts
PR-URL: https://github.com/nodejs/node/pull/36099
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-12-16 23:45:26 +01:00
Antoine du Hamel
08be03b7cb tools: hide commit queue action link
PR-URL: https://github.com/nodejs/node/pull/36124
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-11-17 00:01:43 +00:00
Antoine du Hamel
ac5df63952 build: fix Commit Queue failure comment
Refs: https://github.com/nodejs/node/pull/35206

PR-URL: https://github.com/nodejs/node/pull/35599
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-14 06:11:13 -07:00
Denys Otrishko
ce11b1c395 build: fix landed message for multiple commits in commit-queue
PR-URL: https://github.com/nodejs/node/pull/35226
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2020-10-09 18:37:53 +00:00
Denys Otrishko
5509c1b7e5 build: add Commit Queue actions url to failure comment
PR-URL: https://github.com/nodejs/node/pull/35206
Refs: https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2020-10-09 11:05:32 -07:00
Denys Otrishko
75d943ed4a build: use autorebase option for git node land
This will allow to land commits with multiple commits and also properly
handle proper `fixup` commits.

Refs: https://github.com/nodejs/node-core-utils/pull/473

PR-URL: https://github.com/nodejs/node/pull/34969
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2020-08-31 14:22:03 -07:00
Mary Marchini
a84716a21b build: implement a Commit Queue in Actions
This is a (still experimental) implementation of a Commit Queue on
GitHub Actions, using labels and the scheduler event to land Pull
Requests. It uses `node-core-utils` to validate Pull Requests and to
prepare the commit message, and then it uses a GitHub personal token to
push changes back to the repository. If the Queue fails to land a Pull
Request, that PR will be removed from the queue and the
`node-core-utils` output will be pasted in the Pull Request.

An overview of the implementation is provided in
doc/guides/commit-queue.md, as well as current limitations.

Ref: https://github.com/mmarchini-oss/automated-merge-test
Ref: https://github.com/nodejs/build/issues/2201

PR-URL: https://github.com/nodejs/node/pull/34112
Refs: https://github.com/mmarchini-oss/automated-merge-test
Refs: https://github.com/nodejs/build/issues/2201
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-08-13 18:47:27 -07:00
Mary Marchini
e0d181cf2b build: increase startCI verbosity and fix job name
Ref: https://github.com/nodejs/node/issues/34594#issuecomment-669245839

PR-URL: https://github.com/nodejs/node/pull/34635
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-08-05 10:18:36 -07:00
Mary Marchini
6cab3b0e26 build: auto start Jenkins CI via PR labels
Add an Action that will find every PR with the `request-ci` label and
will start a Jenkins CI for each of these Pull Requests. The scheduler
event is used to circumvent GitHub Actions limitations on Pull Requests
from forks (where secrets are not accessible and the GITHUB_TOKEN is
read-only).

If the Action fails to start a CI, it will add a `request-ci-failed`
label and will leave a comment with the error message from NCU.

Fixes: https://github.com/nodejs/github-bot/issues/234

PR-URL: https://github.com/nodejs/node/pull/34089
Reviewed-By: Christian Clauss <cclauss@me.com>
2020-07-31 16:09:41 -07:00