Commit 5f88791b authored by Toon Claes's avatar Toon Claes

Bring back Danger changelog iid check

The check to verify if the IID in changelog was set was
unintentionally removed in
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27588.
This reverts that change.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/212323
parent 255dfe29
...@@ -28,6 +28,8 @@ def check_changelog_yaml(path) ...@@ -28,6 +28,8 @@ def check_changelog_yaml(path)
if yaml["merge_request"].nil? && !helper.security_mr? 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}" 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"]
fail "Merge request ID was not set to #{gitlab.mr_json["iid"]}! #{SEE_DOC}"
end end
rescue Psych::SyntaxError, Psych::DisallowedClass, Psych::BadAlias rescue Psych::SyntaxError, Psych::DisallowedClass, Psych::BadAlias
# YAML could not be parsed, fail the build. # YAML could not be parsed, fail the build.
......
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