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
I've been testing this feature on https://github.com/mmarchini-oss/automated-merge-test and it works well for most general cases. If anyone wants to give it a try, let me know so I can add you to the repository.
Here's an example of the Action landing a Pull Request:
(https://github.com/mmarchini-oss/automated-merge-test/pull/17)
And here's an example of the comment left by the Action when a PR fails to land:
(https://github.com/mmarchini-oss/automated-merge-test/pull/54#issuecomment-650868578)
Requirements to land
-
Create a Jenkins token for @nodejs-github-bot -
Create a GitHub personal token for @nodejs-github-bot -
Add GH_USER_NAME
,GH_USER_TOKEN
andJENKINS_TOKEN
secrets to this repository (or to the entire org, if we want this to work on forks such as quic and node-auto-test as well) -
Land https://github.com/nodejs/node-core-utils/pull/449, and wait for the next NCU release -
Create commit-queue
andcommit-queue-failed
labels in this repository
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines