| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ddc44dd commit 0787c78
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ From a high-level, the Commit Queue works as follow: | |||
| 25 | 25 | 2. Check if the last Jenkins CI is finished running (if it is not, skip this | |
| 26 | 26 | PR) | |
| 27 | 27 | 3. Remove the `commit-queue` label | |
| 28 | - 4. Run `git node land <pr>` | ||
| 28 | + 4. Run `git node land <pr> --oneCommitMax` | ||
| 29 | 29 | 5. If it fails: | |
| 30 | 30 | 1. Abort `git node land` session | |
| 31 | 31 | 2. Add `commit-queue-failed` label to the PR | |
@@ -37,6 +37,12 @@ From a high-level, the Commit Queue works as follow: | |||
| 37 | 37 | 3. Close the PR | |
| 38 | 38 | 4. Go to next PR in the queue | |
| 39 | 39 | ||
| 40 | + To make the Commit Queue squash all the commits of a pull request into the | ||
| 41 | + first one, add the `commit-queue-squash` label. | ||
| 42 | + To make the Commit Queue land a pull request containing several commits, add the | ||
| 43 | + `commit-queue-rebase` label. When using this option, make sure | ||
| 44 | + that all commits are self-contained, meaning every commit should pass all tests. | ||
| 45 | + | ||
| 40 | 46 | ## Current limitations | |
| 41 | 47 | ||
| 42 | 48 | The Commit Queue feature is still in early stages, and as such it might not | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,7 +70,15 @@ for pr in "$@"; do | |||
| 70 | 70 | # Delete the commit queue label | |
| 71 | 71 | gitHubCurl "$(labelsUrl "$pr")"/"$COMMIT_QUEUE_LABEL" DELETE | |
| 72 | 72 | ||
| 73 | - git node land --autorebase --yes "$pr" >output 2>&1 || echo "Failed to land #${pr}" | ||
| 73 | + if gitHubCurl "$(labelsUrl "$pr")" GET | jq -e 'map(.name) | index("commit-queue-squash")'; then | ||
| 74 | + MULTIPLE_COMMIT_POLICY="--fixupAll" | ||
| 75 | + elif gitHubCurl "$(labelsUrl "$pr")" GET | jq -e 'map(.name) | index("commit-queue-rebase")'; then | ||
| 76 | + MULTIPLE_COMMIT_POLICY="" | ||
| 77 | + else | ||
| 78 | + MULTIPLE_COMMIT_POLICY="--oneCommitMax" | ||
| 79 | + fi | ||
| 80 | + | ||
| 81 | + git node land --autorebase --yes $MULTIPLE_COMMIT_POLICY "$pr" >output 2>&1 || echo "Failed to land #${pr}" | ||
| 74 | 82 | # cat here otherwise we'll be supressing the output of git node land | |
| 75 | 83 | cat output | |
| 76 | 84 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments