Skip to content

Instantly share code, notes, and snippets.

@rdpickard
Created November 13, 2022 23:10
Show Gist options
  • Save rdpickard/5a096667bf935ae6dac646ad7b25bdcb to your computer and use it in GitHub Desktop.
Save rdpickard/5a096667bf935ae6dac646ad7b25bdcb to your computer and use it in GitHub Desktop.
Graph the number of issues on a git repo by date from the command line using github command line tool
gh api -H "Accept: application/vnd.github+json" /repos/mastodon/mastodon/issues --paginate | jq -r ".[] | .created_at" | awk '{ print substr( $0, 1, length($0)-10 ) }' | sort | uniq -c | sed -e 's/^ *//' | sed -r 's/([0-9]*) (.*)/\2 \1/' | gnuplot -p -e 'set title "Mastodon git repo issues by date" ; set xdata time; set timefmt "%Y-%m-%d"; set format x "%Y-%m"; plot "/dev/stdin" using 1:2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment