lib/tracker_api/resources/epic.rb in tracker_api-1.7.1 vs lib/tracker_api/resources/epic.rb in tracker_api-1.8.0
- old
+ new
@@ -32,8 +32,17 @@
def save
raise ArgumentError, 'Can not update an epic with an unknown project_id.' if project_id.nil?
Endpoints::Epic.new(client).update(self, UpdateRepresenter.new(self))
end
+
+ # @param [Hash] params attributes to create the comment with
+ # @return [Comment] newly created Comment
+ def create_comment(params)
+ files = params.delete(:files)
+ comment = Endpoints::Comment.new(client).create(project_id, id, params)
+ comment.create_attachments(files: files) if files.present?
+ comment
+ end
end
end
end