diff --git a/bin/git-pull-request b/bin/git-pull-request index b5ebad3..5db1186 100755 --- a/bin/git-pull-request +++ b/bin/git-pull-request @@ -31,7 +31,11 @@ test -z "$user" && abort "git config user.email required" # branch -branch=${1-$(git symbolic-ref HEAD)} +branch=${1-$(git symbolic-ref HEAD | sed 's/refs\/heads\///')} + +# make sure it's pushed + +git push origin $branch || abort "failed to push $branch" # lame hack to get project @@ -48,6 +52,7 @@ echo # create pull request -body=$(json $title $body $branch) +body=$(json "$title" "$body" $branch) +echo curl -u "$user" "https://api.github.com/repos/$project/pulls" -d "$body" curl -u "$user" "https://api.github.com/repos/$project/pulls" -d "$body"