Class: Theoj::ReviewIssue

Inherits:
Object
  • Object
show all
Includes:
GitHub
Defined in:
lib/theoj/review_issue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GitHub

#can_be_assignee?, #github_access_token, #github_client, #github_headers, #is_collaborator?, #is_invited?, #issue, #issue_labels, #user_login, #username?

Constructor Details

#initialize(repository, issue_id, access_token = nil) ⇒ ReviewIssue

Returns a new instance of ReviewIssue.



12
13
14
15
16
# File 'lib/theoj/review_issue.rb', line 12

def initialize(repository, issue_id, access_token=nil)
  @issue_id = issue_id
  @repository = repository
  @github_access_token = access_token
end

Instance Attribute Details

#issue_idObject

Returns the value of attribute issue_id.



7
8
9
# File 'lib/theoj/review_issue.rb', line 7

def issue_id
  @issue_id
end

#local_pathObject

Returns the value of attribute local_path.



10
11
12
# File 'lib/theoj/review_issue.rb', line 10

def local_path
  @local_path
end

#paperObject

Returns the value of attribute paper.



9
10
11
# File 'lib/theoj/review_issue.rb', line 9

def paper
  @paper
end

#repositoryObject

Returns the value of attribute repository.



8
9
10
# File 'lib/theoj/review_issue.rb', line 8

def repository
  @repository
end

Instance Method Details

#book_archiveObject



52
53
54
# File 'lib/theoj/review_issue.rb', line 52

def book_archive
  @book_archive ||= read_value_from_body("book-archive")
end

#book_exec_urlObject

Removes @archive, uses the following instead.



40
41
42
# File 'lib/theoj/review_issue.rb', line 40

def book_exec_url
  @book_exec_url ||= read_value_from_body("book-exec-url")
end

#data_archiveObject



48
49
50
# File 'lib/theoj/review_issue.rb', line 48

def data_archive
  @data_archive ||= read_value_from_body("data-archive")
end

#docker_archiveObject



56
57
58
# File 'lib/theoj/review_issue.rb', line 56

def docker_archive
  @docker_archive ||= read_value_from_body("docker-archive")
end

#editorObject



34
35
36
# File 'lib/theoj/review_issue.rb', line 34

def editor
  @editor ||= read_value_from_body("editor")
end

#issue_bodyObject



18
19
20
# File 'lib/theoj/review_issue.rb', line 18

def issue_body
  @issue_body ||= issue(repository, issue_id).body
end

#paper_branchObject



65
66
67
# File 'lib/theoj/review_issue.rb', line 65

def paper_branch
  @paper_branch ||= read_value_from_body("branch")
end

#repository_archiveObject



44
45
46
# File 'lib/theoj/review_issue.rb', line 44

def repository_archive
  @repository_archive ||= read_value_from_body("repository-archive")
end

#reviewersObject



30
31
32
# File 'lib/theoj/review_issue.rb', line 30

def reviewers
  @reviewers ||= read_value_from_body("reviewers-list").split(",").map{|r| r.strip} - ["Pending", "TBD"]
end

#target_repositoryObject



26
27
28
# File 'lib/theoj/review_issue.rb', line 26

def target_repository
  @target_repository ||= read_value_from_body("target-repository")
end

#value_for(value_name) ⇒ Object



69
70
71
# File 'lib/theoj/review_issue.rb', line 69

def value_for(value_name)
  read_value_from_body(value_name)
end

#versionObject



61
62
63
# File 'lib/theoj/review_issue.rb', line 61

def version
  @version ||= read_value_from_body("version")
end