Commit 24e8076
committed
feat: add git node staging command
Add a new `git node staging` command that automates cherry-picking
commits into staging branches.
It works by cherry-picking all commits that have no conflicts and
stopping when finding commits that have conflicts so that the
releaser can either manually fix that conflict to continue or skip.
Usage:
Fetches a commit list using `branch-diff` and automatically
cherry-picks / skips commits based on whether or not they land
cleanly:
git node staging
By default the script will add `backport-request` labels to any
skip commit, in order to run in a "dry-run" mode, avoiding the GH
cli interactions, you can use the `skipGH` flag, e.g:
git node staging --skipGH
After fixing up manual conflicts using `git cherry-pick --continue`
the releaser can resume the cherry-pick queue:
git node staging --continue
Similarly, after manually skipping a commit using
`git cherry-pick --skip` the releaser can resume the cherry-pick
queue using:
git node staging --skip
If you want to run the script and automatically skip any commit
that is unable to land cleanly you can use the `--autoSkip` flag:
git node staging --autoSkip
Sets a custom reporter at the end of the automated operation:
git node staging --reporter=json
Limits to 10 the number of commits to be cherry-picked:
git node staging --pagination=10
Automates the backport request message, this won't run any of the
`branch-diff` or cherry-pick routines. Useful for when you removed
a faulty commit from the branch and want to signal to PR author and
collaborators that commit now needs backporting, just use its PR#:
git node staging --backport=12345
More:
The automate cherry-pick logic also includes local persistency of
the ongoing commit list, in case a fatal error happens during the
command execution, it's possible to resume after cleaning up the
git repo state by running `git node staging` again.1 parent 3afe24f commit 24e8076
3 files changed
+815
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
532 | 544 | | |
533 | 545 | | |
534 | 546 | | |
| |||
0 commit comments