Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 8c51ad2

Browse files
committed
feat(scripts): pick-pr
1 parent 0d5c99e commit 8c51ad2

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

scripts/pick-pr

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
3+
# Usage: pick-pr <pr-number>
4+
#
5+
# Takes a PR and cherry-picks it into the current branch.
6+
# Assumes you have a "pr" branch set up.
7+
8+
set -e
9+
10+
PR=$1
11+
echo "Picking PR $1"
12+
13+
for sha in $(git rev-list --reverse pr/$PR ^upstream/master); do
14+
git cherry-pick $sha;
15+
done
16+
17+
export PR
18+
export GIT_EDITOR=$(dirname $0)/pick-pr-editor
19+
git commit --amend

scripts/pick-pr-editor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
FILE=$1
4+
echo "Closes #$PR" >>$FILE

0 commit comments

Comments
 (0)