Skip to content

Instantly share code, notes, and snippets.

@jshawl
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jshawl/9050522 to your computer and use it in GitHub Desktop.
Save jshawl/9050522 to your computer and use it in GitHub Desktop.

Which forks have updates?

You can use the GitHub API.

Get forks of a repo

repo = getJSON(https://api.github.com/repos/jshawl/pocket-oauth-php)
forksURL = repo.forks_url;
forks = getJSON(forksURL);

Get last updated time from forks

for ( fork in forks ) {
  if ( fork.updated_time > fork.created_time ) {
    notify( 'The fork - ' + repo.html_url + 'has been updated since it was forked')
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment