diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-23 17:47:40 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-23 17:47:40 +0100 |
commit | 4b710e8528d39de369187ab9846d4ab1c4c8fea3 (patch) | |
tree | fadf1d51ed78b5cab64f58eb99563fe996ff8aa8 | |
parent | c9cf9c95209ba3bf4000ebd3632b9d096dae1646 (diff) | |
download | git-merge-pr-4b710e8528d39de369187ab9846d4ab1c4c8fea3.tar.gz git-merge-pr-4b710e8528d39de369187ab9846d4ab1c4c8fea3.tar.xz git-merge-pr-4b710e8528d39de369187ab9846d4ab1c4c8fea3.zip |
Show when no open PR are there
-rwxr-xr-x | git-merge-pr | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-merge-pr b/git-merge-pr index 4e59fe8..464f5f6 100755 --- a/git-merge-pr +++ b/git-merge-pr @@ -19,7 +19,9 @@ PROJECT=${PROJECT#//github.com/} if [ -z "$PR" ]; then wget -q -O- --header 'Accept: application/json' \ "https://api.github.com/repos/${PROJECT}/pulls?direction=asc" | - jq -r '.[] | "\(.number) <\(.user.login)> \(.title)"' + jq -r 'if length > 0 + then .[] | "\(.number) <\(.user.login)> \(.title)" + else "No open pull requests." end' exit $? else shift |