Class: SyncIssues::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/sync_issues/issue.rb

Overview

Issue represents an issue to be added or updated.

new_title is only used when an issue should be renamed. Issues with new_title set will never be created

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, title:, assignees: nil, labels: nil, new_title: nil) ⇒ Issue

Returns a new instance of Issue.



11
12
13
14
15
16
17
18
# File 'lib/sync_issues/issue.rb', line 11

def initialize(content, title:, assignees: nil, labels: nil, new_title: nil)
  @assignees = verify_array_or_string 'assignees', assignees
  @assignees.sort! unless @assignees.nil?
  @content = content
  @labels = verify_array_or_string 'labels', labels
  @new_title = verify_string 'new_title', new_title, allow_nil: true
  @title = verify_string 'title', title, allow_nil: false
end

Instance Attribute Details

#assigneesObject (readonly)

Returns the value of attribute assignees.



9
10
11
# File 'lib/sync_issues/issue.rb', line 9

def assignees
  @assignees
end

#contentObject (readonly)

Returns the value of attribute content.



9
10
11
# File 'lib/sync_issues/issue.rb', line 9

def content
  @content
end

#labelsObject (readonly)

Returns the value of attribute labels.



9
10
11
# File 'lib/sync_issues/issue.rb', line 9

def labels
  @labels
end

#new_titleObject (readonly)

Returns the value of attribute new_title.



9
10
11
# File 'lib/sync_issues/issue.rb', line 9

def new_title
  @new_title
end

#titleObject (readonly)

Returns the value of attribute title.



9
10
11
# File 'lib/sync_issues/issue.rb', line 9

def title
  @title
end