class WhatsupGithub::Client
Create a singleton object for Client
. Authorize with a GitHub token from $WHATSUP_GITHUB_ACCESS_TOKEN if available Otherwise, use credentials from ~/.netrc Otherwise, continue as a Guest
Constants
- WHATSUP_GITHUB_ACCESS_TOKEN
Public Class Methods
new()
click to toggle source
# File lib/whatsup_github/client.rb, line 17 def initialize @client = if WHATSUP_GITHUB_ACCESS_TOKEN Octokit::Client.new(access_token: WHATSUP_GITHUB_ACCESS_TOKEN) elsif File.exist? "#{ENV['HOME']}/.netrc" Octokit::Client.new(netrc: true) else Octokit::Client.new end end
Public Instance Methods
org_members(org)
click to toggle source
# File lib/whatsup_github/client.rb, line 36 def org_members(org) @client.org_members(org) end
pull_request(repo, number)
click to toggle source
# File lib/whatsup_github/client.rb, line 32 def pull_request(repo, number) @client.pull_request(repo, number) end
search_issues(query)
click to toggle source
# File lib/whatsup_github/client.rb, line 28 def search_issues(query) @client.search_issues(query) end