chore(ci): presubmit-pr-888 adds Closes #888 on merge

Closes #1234
This commit is contained in:
Misko Hevery 2015-08-08 19:23:14 -07:00
parent 24eabb9bb1
commit 4038150246
1 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,15 @@ if [ "$TRAVIS_REPO_SLUG" = "angular/angular" ]; then
git stash
git fetch upstream master
git rebase upstream/master
if [[ $TRAVIS_BRANCH == *"-pr-"* ]]; then
PR_NO=`echo presubmit-mhevery-pr-1234 | sed -e 's/^.*-pr-//'`
if echo $PR_NO | egrep -q '^[0-9]+$'; then
echo "Adding Closes #$PR_NO"
git filter-branch -f --msg-filter "cat /dev/stdin && echo && echo Closes \#$PR_NO" HEAD~1..HEAD
fi
fi
if git push upstream HEAD:master; then
echo "$TRAVIS_BRANCH has been merged into master, deleting..."
git push upstream :"$TRAVIS_BRANCH"