Commit bac4c300 authored by Rémy Coutable's avatar Rémy Coutable

Only post 'Retry' message if Danger says anything

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 60fcd514
...@@ -15,4 +15,8 @@ gitlab_danger.rule_names.each do |file| ...@@ -15,4 +15,8 @@ gitlab_danger.rule_names.each do |file|
danger.import_dangerfile(path: File.join('danger', file)) danger.import_dangerfile(path: File.join('danger', file))
end end
markdown("**If needed, you can retry the [`danger-review` job](#{ENV['CI_JOB_URL']}) that generated this comment.**") if gitlab_danger.ci? anything_to_post = status_report.values.any? { |data| data.any? }
if gitlab_danger.ci? && anything_to_post
markdown("**If needed, you can retry the [`danger-review` job](#{ENV['CI_JOB_URL']}) that generated this comment.**")
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment