We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c533eb5 commit 3090a19Copy full SHA for 3090a19
scripts/pick-pr
@@ -0,0 +1,25 @@
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
scripts/pick-pr-editor
@@ -0,0 +1,4 @@
+FILE=$1
+echo "Closes #$PR" >>$FILE
0 commit comments