class Gf::Repositry
Attributes
owner_slash_repo[R]
Public Class Methods
new(owner_slash_repo)
click to toggle source
# File lib/gf.rb, line 126 def initialize(owner_slash_repo) @client = nil @owner_slash_repo = owner_slash_repo end
Public Instance Methods
collect_pull_requested_files()
click to toggle source
# File lib/gf.rb, line 131 def collect_pull_requested_files pulls = client.pulls(owner_slash_repo, state: 'open').map { |pull| PullRequest.new(pull) } pulls.each_with_object(Hash.new {|h, path| h[path] = DiffFile.new(path) }) do |pull, files| pull.changed_files.each do |path| files[path] << pull end end end
Private Instance Methods
client()
click to toggle source
# File lib/gf.rb, line 143 def client @client ||= ::Octokit::Client.new(netrc: true).tap(&:login) end