lib/github_dash/repository.rb
# Get a client which can access certain repository
#   If passed without a pre_name parameter, assume that @repo_data has been
#   initialized, and get the name from that
Get a client which can access certain repository
If passed without a pre_name parameter, assume that @repo_data has been
initialized, and get the name from that
Get a client which can access certain repository If passed without a pre_name parameter assume that @repo_data has been initialized and get the name from that
def client_for(repo_name = nil)
      repo_name ||= @repo_data.full_name
      token = GithubDash::DataDepository.get_token_for_repo(repo_name)
      token = GithubDash::DataDepository.get_token if token.nil?
      Octokit if token.nil?
      client = Octokit::Client.new(:access_token => token)
    end
def client_for ( repo_name = nil ) repo_name ||= @repo_data . full_name token = GithubDash :: DataDepository . get_token_for_repo ( repo_name ) token = GithubDash :: DataDepository . get_token if token . nil? Octokit if token . nil? client = Octokit :: Client . new ( :access_token => token ) end
Get a client which can access certain repository
If passed without a pre_name parameter, assume that @repo_data has been
initialized, and get the name from that
Get a client which can access certain repository If passed without a pre_name parameter assume that @repo_data has been initialized and get the name from that
# Get the token # Use the most recent token if this repo doesn't have an associated token # Use default client if the token is nil # Return new client
repo_name
<not_specific>