lib/danger/request_sources/vsts.rb in danger-5.5.7 vs lib/danger/request_sources/vsts.rb in danger-5.5.8
- old
+ new
@@ -70,11 +70,11 @@
def organisation
nil
end
- def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [], danger_id: "danger", new_comment: false)
+ def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [], danger_id: "danger", new_comment: false, remove_previous_comments: false)
unless @api.supports_comments?
return
end
comment = generate_description(warnings: warnings, errors: errors)
@@ -84,10 +84,10 @@
messages: messages,
markdowns: markdowns,
previous_violations: {},
danger_id: danger_id,
template: "vsts")
- if new_comment
+ if new_comment || remove_previous_comments
post_new_comment(comment)
else
update_old_comment(comment, danger_id: danger_id)
end
end