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

Merge branch...

Merge branch '219025-danger-bot-shouldn-t-post-a-message-inviting-to-retry-when-it-s-the-only-message-posted' into 'master'

Only post the 'Retry' message when Danger has anything to say

Closes #219025

See merge request gitlab-org/gitlab!32983
parents d2b28da7 bac4c300
......@@ -15,4 +15,8 @@ gitlab_danger.rule_names.each do |file|
danger.import_dangerfile(path: File.join('danger', file))
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