module GitHub
Public Class Methods
api()
click to toggle source
# File lib/git-ready/github.rb, line 20 def self.api @api ||= Octokit::Client.new access_token: Settings.github_access_token, auto_paginate: true end
fork_all(organization, filter=nil)
click to toggle source
# File lib/git-ready/github.rb, line 10 def self.fork_all(organization, filter=nil) repositories = api.org_repos(organization).select { |repository| repository.name.include? filter } progress = ProgressBar.new repositories.length repositories.flat_map do |repository| progress.increment! { upstream: repository, origin: api.fork(repository[:full_name]) } end end