mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Added git-pull-request
This commit is contained in:
parent
3315c8e19a
commit
28f52e69ee
15
bin/git-pull-request
Executable file
15
bin/git-pull-request
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
request=$1
|
||||
repo=${PWD##*/}
|
||||
user=`git config github.user`
|
||||
url="https://github.com/$user/$repo/pull/$request.patch"
|
||||
|
||||
test -z "$request" && echo "pull request number required" && exit 1
|
||||
test -z "$repo" && echo "failed to detect repo" && exit 2
|
||||
test -z "$user" && echo "failed to fetch github.user" && exit 3
|
||||
|
||||
echo "pulling $url"
|
||||
curl -# $url \
|
||||
| git am --signoff \
|
||||
&& echo "completed pull request $request"
|
||||
Loading…
Reference in a new issue