Class: GhDraftIssueConverter::DraftIssue
- Inherits:
-
Object
- Object
- GhDraftIssueConverter::DraftIssue
- Defined in:
- lib/gh_draft_issues_converter/gh_draft_issues_converter.rb
Instance Attribute Summary collapse
-
#assign_user_ids ⇒ Object
readonly
Returns the value of attribute assign_user_ids.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#field_values ⇒ Object
readonly
Returns the value of attribute field_values.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(id, title, body, assign_user_ids, field_values) ⇒ DraftIssue
constructor
[ FieldValue, FieldValue ].
- #unnecessary_for_convert_issue? ⇒ Boolean
- #user_ids_github_format ⇒ Object
Constructor Details
#initialize(id, title, body, assign_user_ids, field_values) ⇒ DraftIssue
[
FieldValue, FieldValue
]
14 15 16 17 18 19 20 |
# File 'lib/gh_draft_issues_converter/gh_draft_issues_converter.rb', line 14 def initialize(id, title, body, assign_user_ids, field_values) @id = id @title = title @body = body @field_values = field_values @assign_user_ids = assign_user_ids end |
Instance Attribute Details
#assign_user_ids ⇒ Object (readonly)
Returns the value of attribute assign_user_ids.
7 8 9 |
# File 'lib/gh_draft_issues_converter/gh_draft_issues_converter.rb', line 7 def assign_user_ids @assign_user_ids end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
7 8 9 |
# File 'lib/gh_draft_issues_converter/gh_draft_issues_converter.rb', line 7 def body @body end |
#field_values ⇒ Object (readonly)
Returns the value of attribute field_values.
7 8 9 |
# File 'lib/gh_draft_issues_converter/gh_draft_issues_converter.rb', line 7 def field_values @field_values end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/gh_draft_issues_converter/gh_draft_issues_converter.rb', line 7 def id @id end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/gh_draft_issues_converter/gh_draft_issues_converter.rb', line 7 def title @title end |
Instance Method Details
#unnecessary_for_convert_issue? ⇒ Boolean
22 23 24 25 26 27 28 |
# File 'lib/gh_draft_issues_converter/gh_draft_issues_converter.rb', line 22 def unnecessary_for_convert_issue? false #field_values.any? do |field_value| # field_value.field_name == "Status" && field_value.field_value_name == "🚫unnecessary" #end end |
#user_ids_github_format ⇒ Object
30 31 32 |
# File 'lib/gh_draft_issues_converter/gh_draft_issues_converter.rb', line 30 def user_ids_github_format assign_user_ids.map { |id| "\"#{id}\""}.join(", ") end |