build: Add GitHub scripts for rebasing PRs (#18359)

PR Close #18359
This commit is contained in:
Miško Hevery
2017-07-26 12:37:14 -07:00
committed by Miško Hevery
parent 2e714f9f2a
commit d1764fc3dd
10 changed files with 706 additions and 2 deletions

12
scripts/github/push-upstream Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -u -e -o pipefail
PATCH_BRANCH=`git branch --list '*.x' | cut -d ' ' -f2- | sort -r | head -n1`
# Trim whitespace
PATCH_BRANCH=`echo $PATCH_BRANCH`
PUSH_BRANCHES="git push git@github.com:angular/angular.git master:master $PATCH_BRANCH:$PATCH_BRANCH"
echo $PUSH_BRANCHES
$PUSH_BRANCHES