aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-merge-pr4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-merge-pr b/git-merge-pr
index cffde3a..2d11511 100755
--- a/git-merge-pr
+++ b/git-merge-pr
@@ -18,9 +18,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" |
+ "https://api.github.com/repos/${PROJECT}/pulls" |
jq -r 'if length > 0
- then .[] | "\(.number) <\(.user.login)> \(.title)"
+ then reverse[] | "\(.number) <\(.user.login)> \(.title)"
else "No open pull requests." end'
exit $?
else