Skip to content

Commit 46766a1

Browse files
lundibundirichardlau
authored andcommitted
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: nodejs/node-core-utils#473 PR-URL: #34969 Reviewed-By: Mary Marchini <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Shelley Vohr <[email protected]>
1 parent 7afb67f commit 46766a1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/guides/commit-queue.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ The Commit Queue feature is still in early stages, and as such it might not
4343
work for more complex Pull Requests. These are the currently known limitations
4444
of the commit queue:
4545

46-
1. The Pull Request must have only one commit
46+
1. All commits in a Pull Request must either be following commit message
47+
guidelines or be a valid [`fixup!`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---fixupltcommitgt)
48+
commits that will be correctly handled by [`--autosquash`](https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---autosquash)
49+
option
4750
2. A CI must've ran and succeeded since the last change on the PR
4851
3. A Collaborator must have approved the PR since the last change
4952
4. Only Jenkins CI is checked (Actions, V8 CI and CITGM are ignored)

tools/actions/commit-queue.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ for pr in "$@"; do
5555
# Delete the commit queue label
5656
gitHubCurl "$(labelsUrl "$pr")"/"$COMMIT_QUEUE_LABEL" DELETE
5757

58-
git node land --yes "$pr" >output 2>&1 || echo "Failed to land #${pr}"
58+
git node land --autorebase --yes "$pr" >output 2>&1 || echo "Failed to land #${pr}"
5959
# cat here otherwise we'll be supressing the output of git node land
6060
cat output
6161

0 commit comments

Comments
 (0)