Skip to content

Instantly share code, notes, and snippets.

@ajtowns
Last active September 10, 2019 11:42
Show Gist options
  • Save ajtowns/6073bd110b9f3193293b4321ce8a0394 to your computer and use it in GitHub Desktop.
Save ajtowns/6073bd110b9f3193293b4321ce8a0394 to your computer and use it in GitHub Desktop.
p2p PR dashboard

As an idea to make it easier to keep track of review work for P2P related stuff, maybe we could use a github project as a dashboard.

Turns out you can do this on a personal project board by creating notes saying things like "bitcoin/bitcoin#16401" and it turns into a bitcoin PR like magic. So I've made a trial:

https://github.com/users/ajtowns/projects/1

Should make it easy to pick what to work on:

  • high-pri has the big stuff; blockers, bug fixes, and nearly-ready-to-merge features
  • features and wip is where the big new stuff is
  • low-impact and internal are for smaller things
  • refactors are all segregated into the tech-debt column

Happy to add modify perms to the project/board on request

#!/bin/bash
# Quick and dirty script that queries the github html pages for the project board columns and PRs by label, then works out the differences
curl 2>/dev/null https://github.com/users/ajtowns/projects/1/columns/645{2532,2533,2747,2538,2526,2540,3275}/cards | grep href=./bitcoin/bitcoin/pull | sed 's,^.*href="/bitcoin/bitcoin/pull/,,;s/">.*$//' | sort -u > PRs-on-board
curl 2>/dev/null 'https://github.com/bitcoin/bitcoin/pulls?page='{1,2,3,4}'&q=is%3Apr+is%3Aopen+label%3A'{P2P,Validation,\"TX+fees+and+policy\"} | grep 'id="issue_[0-9]*_link"' | sed 's,</a>,,;s,^.*<a id="issue_,,;s/_.*">/ /' | sort -u > PRs-with-labels
(cat PRs-on-board{,} ; sed 's/ .*//' < PRs-with-labels) | sort | uniq -c | sort -n | sed -n 's,^ *1 ,+ bitcoin/bitcoin#,p;s/^ *2 /- /p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment