Class: AssistedWorkflow::Addons::GithubStory
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- AssistedWorkflow::Addons::GithubStory
- Defined in:
- lib/assisted_workflow/addons/github.rb
Instance Method Summary collapse
- #current_state ⇒ Object
- #description ⇒ Object
- #estimate ⇒ Object
- #id ⇒ Object
-
#initialize(issue) ⇒ GithubStory
constructor
A new instance of GithubStory.
- #issue ⇒ Object
- #labels ⇒ Object
- #name ⇒ Object
- #other_id ⇒ Object
Constructor Details
#initialize(issue) ⇒ GithubStory
Returns a new instance of GithubStory.
8 9 10 11 |
# File 'lib/assisted_workflow/addons/github.rb', line 8 def initialize(issue) super @issue = issue end |
Instance Method Details
#current_state ⇒ Object
29 30 31 |
# File 'lib/assisted_workflow/addons/github.rb', line 29 def current_state other_id end |
#description ⇒ Object
21 22 23 |
# File 'lib/assisted_workflow/addons/github.rb', line 21 def description @issue.body.to_s.gsub("\r\n", "\n") end |
#estimate ⇒ Object
37 38 39 40 |
# File 'lib/assisted_workflow/addons/github.rb', line 37 def estimate labels.join(", ") # @issue.repository.name if @issue.repository end |
#id ⇒ Object
13 14 15 |
# File 'lib/assisted_workflow/addons/github.rb', line 13 def id @issue.number end |
#issue ⇒ Object
42 43 44 |
# File 'lib/assisted_workflow/addons/github.rb', line 42 def issue @issue end |
#labels ⇒ Object
33 34 35 |
# File 'lib/assisted_workflow/addons/github.rb', line 33 def labels @issue.labels.map(&:name) end |
#name ⇒ Object
17 18 19 |
# File 'lib/assisted_workflow/addons/github.rb', line 17 def name @issue.title end |
#other_id ⇒ Object
25 26 27 |
# File 'lib/assisted_workflow/addons/github.rb', line 25 def other_id @issue.assignee.login end |