Class: Theoj::ReviewIssue
- Inherits:
-
Object
- Object
- Theoj::ReviewIssue
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_id ⇒ Object
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_path ⇒ Object
Returns the value of attribute local_path.
10
11
12
|
# File 'lib/theoj/review_issue.rb', line 10
def local_path
@local_path
end
|
#paper ⇒ Object
Returns the value of attribute paper.
9
10
11
|
# File 'lib/theoj/review_issue.rb', line 9
def paper
@paper
end
|
#repository ⇒ Object
Returns the value of attribute repository.
8
9
10
|
# File 'lib/theoj/review_issue.rb', line 8
def repository
@repository
end
|
Instance Method Details
#archive ⇒ Object
38
39
40
|
# File 'lib/theoj/review_issue.rb', line 38
def archive
@archive ||= read_value_from_body("archive")
end
|
#editor ⇒ Object
34
35
36
|
# File 'lib/theoj/review_issue.rb', line 34
def editor
@editor ||= read_value_from_body("editor")
end
|
#issue_body ⇒ Object
18
19
20
|
# File 'lib/theoj/review_issue.rb', line 18
def issue_body
@issue_body ||= issue(repository, issue_id).body
end
|
#paper_branch ⇒ Object
46
47
48
|
# File 'lib/theoj/review_issue.rb', line 46
def paper_branch
@paper_branch ||= read_value_from_body("branch")
end
|
#reviewers ⇒ Object
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_repository ⇒ Object
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
50
51
52
|
# File 'lib/theoj/review_issue.rb', line 50
def value_for(value_name)
read_value_from_body(value_name)
end
|
#version ⇒ Object
42
43
44
|
# File 'lib/theoj/review_issue.rb', line 42
def version
@version ||= read_value_from_body("version")
end
|