Class: AssistedWorkflow::Addons::GithubStory

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/assisted_workflow/addons/github.rb

Instance Method Summary collapse

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_stateObject



29
30
31
# File 'lib/assisted_workflow/addons/github.rb', line 29

def current_state
  other_id
end

#descriptionObject



21
22
23
# File 'lib/assisted_workflow/addons/github.rb', line 21

def description
  @issue.body.to_s.gsub("\r\n", "\n")
end

#estimateObject



37
38
39
40
# File 'lib/assisted_workflow/addons/github.rb', line 37

def estimate
  labels.join(", ")
  # @issue.repository.name if @issue.repository
end

#idObject



13
14
15
# File 'lib/assisted_workflow/addons/github.rb', line 13

def id
  @issue.number
end

#issueObject



42
43
44
# File 'lib/assisted_workflow/addons/github.rb', line 42

def issue
  @issue
end

#labelsObject



33
34
35
# File 'lib/assisted_workflow/addons/github.rb', line 33

def labels
  @issue.labels.map(&:name)
end

#nameObject



17
18
19
# File 'lib/assisted_workflow/addons/github.rb', line 17

def name
  @issue.title
end

#other_idObject



25
26
27
# File 'lib/assisted_workflow/addons/github.rb', line 25

def other_id
  @issue.assignee.
end