about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-02-25 17:14:24 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-02-25 17:17:50 +0100
commit319685958fd7e4475770f79828c5e4c220b76467 (patch)
tree482abb214187de3c3b42c7839039bd9fa2398738
parent3fc5d5b15541a97666c53c81f698fad98fff8c15 (diff)
downloadgit-merge-pr-319685958fd7e4475770f79828c5e4c220b76467.tar.gz
git-merge-pr-319685958fd7e4475770f79828c5e4c220b76467.tar.xz
git-merge-pr-319685958fd7e4475770f79828c5e4c220b76467.zip
Print the most recent PRs, but newest last
-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