Module: Gish

Extended by:
Commands::Assignee, Commands::Comment, Commands::Issue, Commands::Label, Commands::Repository, Configuration
Defined in:
lib/gish.rb,
lib/gish/runner.rb,
lib/gish/version.rb,
lib/gish/cli/labels.rb,
lib/gish/cli/comments.rb,
lib/gish/configuration.rb,
lib/gish/commands/issue.rb,
lib/gish/commands/label.rb,
lib/gish/commands/comment.rb,
lib/gish/commands/assignee.rb,
lib/gish/presentation/issue.rb,
lib/gish/presentation/label.rb,
lib/gish/commands/repository.rb,
lib/gish/helpers/date_helpers.rb,
lib/gish/presentation/comment.rb,
lib/gish/helpers/input_helpers.rb,
lib/gish/helpers/terminal_helpers.rb

Defined Under Namespace

Modules: Cli, Commands, Configuration, DateHelpers, InputHelpers, TerminalHelpers Classes: Comment, Issue, Label, Runner

Constant Summary collapse

VERSION =
"0.9.4"

Instance Attribute Summary

Attributes included from Configuration

#access_token, #browser, #editor, #repository

Class Method Summary collapse

Methods included from Configuration

defaults, extended, github_url

Methods included from InputHelpers

#capture_editor_input, #confirm, #prompt

Methods included from Commands::Label

create_label, delete_labels, list_labels, update_label

Methods included from Commands::Issue

assign, browse, close, comment, comments, create, edit, label, list, reopen, show, unassign, unlabel

Methods included from Commands::Comment

delete_comment, issue_comment, update_comment

Methods included from Commands::Assignee

list_assignees

Methods included from Commands::Repository

is_collaborator?

Class Method Details

.clientObject



19
20
21
# File 'lib/gish.rb', line 19

def self.client
  @github ||= Octokit::Client.new(:access_token => Gish.access_token)
end

.request(resource = 'issue/comment/label') ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/gish.rb', line 23

def self.request(resource='issue/comment/label')
  begin
    yield()
  rescue Octokit::NotFound
    puts "Could not find #{resource}."
    exit 1
  rescue Octokit::Unauthorized
    puts "Something is wrong with your personal access token."
    exit 1
  end
end