add script for combining multiple PRs

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-10-07 17:00:38 +02:00
parent 45237a0dc3
commit 5a0e38de09
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 19 additions and 0 deletions

19
github/combine_prs.sh Executable file
View File

@ -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