File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
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 an "upstream" remote pointing to GitHub.
7
+
8
+ set -e
9
+
10
+ PR=$1
11
+ echo " Fetching PR $1 from GitHub"
12
+
13
+ git fetch
[email protected] :angular/angular.dart.git master
14
+ MASTER_SHA=$( git rev-list -n 1 FETCH_HEAD)
15
+ git fetch
[email protected] :angular/angular.dart.git pull/
$PR /head
16
+ echo
17
+
18
+ for sha in $( git rev-list --reverse FETCH_HEAD ^$MASTER_SHA ) ; do
19
+ echo " Cherrypicking $( git log --oneline -n 1 $sha ) "
20
+ git cherry-pick $sha ;
21
+ done
22
+
23
+ export PR
24
+ export GIT_EDITOR=$( dirname $0 ) /pick-pr-editor
25
+ git commit --amend
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ FILE=$1
4
+ echo " Closes #$PR " >> $FILE
You can’t perform that action at this time.
0 commit comments