class Amanuensis::Github::Tracker

Public Instance Methods

issues(from) click to toggle source
# File lib/amanuensis/github/tracker.rb, line 5
def issues(from)
  filter(closed_issues, from).map do |issue|
    Issue.new issue['number'], issue['html_url'], issue['title']
  end
end

Private Instance Methods

client() click to toggle source
# File lib/amanuensis/github/tracker.rb, line 27
def client
  Octokit::Client.new(access_token: Github.oauth_token, auto_paginate: true)
end
closed_issues() click to toggle source
# File lib/amanuensis/github/tracker.rb, line 17
def closed_issues
  client.list_issues(Github.repo, state: 'closed').select do |issue|
    !issue['html_url'].include?('pull')
  end
end
closed_pulls() click to toggle source
# File lib/amanuensis/github/tracker.rb, line 23
def closed_pulls
  client.pull_requests(Github.repo, state: 'closed')
end
filter(list, from) click to toggle source
# File lib/amanuensis/github/tracker.rb, line 13
def filter(list, from)
  list.select { |object| object.closed_at > from.to_time }
end