add script for combining multiple PRs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
45237a0dc3
commit
5a0e38de09
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This script is a helper for when dependabot makes too many fucking PRs
|
||||
|
||||
# first argument is the branch name
|
||||
branch="${1}"
|
||||
shift
|
||||
|
||||
# start with a new branch
|
||||
git checkout -b "${branch}"
|
||||
git commit --no-verify --allow-empty -m "combined prs"
|
||||
|
||||
# rest of the arguments should be PR numbers
|
||||
for pr_id in "${@}"; do
|
||||
echo "Including: #${pr_id}"
|
||||
git fetch origin "pull/${pr_id}/head:pr-${pr_id}"
|
||||
git merge --squash "pr-${pr_id}"
|
||||
git commit --no-verify --amend --no-edit .
|
||||
done
|
Loading…
Reference in New Issue