Add simple tools for fetching content of a pull request by ID.

This commit is contained in:
Tim Abbott 2015-12-12 17:06:59 -08:00
parent b2a92877ff
commit 39e80b351d
2 changed files with 17 additions and 0 deletions

10
tools/fetch-rebase-pull-request Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
set -x
request_id="$1"
git fetch origin "pull/$request_id/head"
git checkout origin/master -b "review-${request_id}"
git reset --hard FETCH_HEAD
git pull --rebase

7
tools/reset-to-pull-request Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
set -x
request_id="$1"
git fetch origin "pull/$request_id/head"
git reset --hard FETCH_HEAD