Skip to content

Instantly share code, notes, and snippets.

@philippbosch
Created February 12, 2018 11:10
Show Gist options
  • Save philippbosch/215a8968fc5cf384700e7131a0db5350 to your computer and use it in GitHub Desktop.
Save philippbosch/215a8968fc5cf384700e7131a0db5350 to your computer and use it in GitHub Desktop.
#!/bin/bash
export PATH=$PATH:/usr/local/bin
COUNT=$(curl -s -H 'Authorization: bearer <TOKEN>' -X POST -d '{"query": "{search(query: \"is:pr is:open archived:false sort:updated-desc review-requested:philippbosch\", type: ISSUE, first: 10){issueCount}}"}' https://api.github.com/graphql | jq .data.search.issueCount)
if [ "$COUNT" -ne "0" ] ; then
echo "$COUNT ⎇|color=#ff9900 size=12 href=https://github.com/pulls?q=is%3Apr+is%3Aopen+archived%3Afalse+sort%3Aupdated-desc+review-requested%3Aphilippbosch"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment