Commit d6a96243 authored by Mayra Cabrera's avatar Mayra Cabrera

Prevent adding changelog ID on security MRs

95c0aa51 introduced a new conditional on
changelog Dangerfile that is been triggered on security MRs. This commit
fixes that, as it's not a requirement to add a merge request ID on
changelogs for security merge requests.
parent 05d3494b
......@@ -28,7 +28,7 @@ def check_changelog_yaml(path)
if yaml["merge_request"].nil? && !helper.security_mr?
message "Consider setting `merge_request` to #{gitlab.mr_json["iid"]} in #{gitlab.html_link(path)}. #{SEE_DOC}"
elsif yaml["merge_request"] != gitlab.mr_json["iid"]
elsif yaml["merge_request"] != gitlab.mr_json["iid"] && !helper.security_mr?
fail "Merge request ID was not set to #{gitlab.mr_json["iid"]}! #{SEE_DOC}"
end
rescue Psych::SyntaxError, Psych::DisallowedClass, Psych::BadAlias
......
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