Skip to content

Instantly share code, notes, and snippets.

@eric1234
Created September 14, 2009 18:33
Show Gist options
  • Select an option

  • Save eric1234/186832 to your computer and use it in GitHub Desktop.

Select an option

Save eric1234/186832 to your computer and use it in GitHub Desktop.
Will list all forks related to a project on GitHub.
#!/usr/bin/env ruby
# Provides a way to list forks on github for a project.
#
# git-hub-fork-network user project
require 'rubygems'
require 'octopi'
module Octopi
class Repository < Base
# Will return all forks for the current repository
def all_forks
resources = api.get '/repos/show/:user/:repo/network',
{:user => self.owner, :repo => self.name}
resources['network'].map { |item| self.class.new(api, item) }
end
end
end
repo = Octopi::Repository.find *ARGV
repo.all_forks.each do |fork|
puts fork.clone_url
end
@johnjohndoe

Copy link
Copy Markdown

@eric1234 Your script is no longer working. Would be cool if you can fix it.

@bityob

bityob commented Jun 12, 2017

Copy link
Copy Markdown

http://forked.yannick.io/ - A web app to list all forks, very useful.

This is the source code: https://github.com/ys/forked

@JimnyGitHub

Copy link
Copy Markdown

http://forked.yannick.io/ - A web app to list all forks, very useful.

This is the source code: https://github.com/ys/forked

error 404, page not found

it's a pity, the project no longer exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment