title: How to determine which forks on GitHub are ahead?
body: <p>Sometimes, the original GitHub repository of a piece of software I'm using, such as <a href="https://github.com/wummel/linkchecker" rel="noreferrer">linkchecker</a>, is seeing little or no development, while a lot of forks have been created (in this case: 142, at the time of writing).</p>
  
  <p>For each fork, I'd like to know:</p>
  
  <ul>
  <li>which branches it has with commits ahead of the original master branch</li>
  </ul>
  
  <p>and for each such branch:</p>
  
  <ul>
  <li>how many commits it is ahead of the original</li>
  <li>how many commits it is behind</li>
  </ul>
  
  <p><a href="https://stackoverflow.com/questions/31671585/github-comparing-across-forks">GitHub has a web interface for comparing forks</a>, but I don't want to do this manually for each fork, I just want a CSV file with the results for all forks. How can this be scripted? <a href="https://developer.github.com/v3/repos/forks/" rel="noreferrer">The GitHub API can list the forks</a>, but I can't see how to compare forks with it. Cloning every fork in turn and doing the comparison locally seems a bit crude.</p>