diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-03 03:09:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-03 03:09:23 +0300 |
commit | 57b359e90cc658221ace134673d86aa1d70ac878 (patch) | |
tree | db5a6830b5190f2e7fca2cd9ab4a1dcd64594153 /danger | |
parent | 2c0e92d0314ca00907b75b103af507d9a28a2d62 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r-- | danger/changelog/Dangerfile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/danger/changelog/Dangerfile b/danger/changelog/Dangerfile index 73e58935003..f9e65bbf4c7 100644 --- a/danger/changelog/Dangerfile +++ b/danger/changelog/Dangerfile @@ -35,7 +35,11 @@ def check_changelog_yaml(path) fail "`title` should be set, in #{gitlab.html_link(path)}! #{SEE_DOC}" if yaml["title"].nil? fail "`type` should be set, in #{gitlab.html_link(path)}! #{SEE_DOC}" if yaml["type"].nil? - if yaml["merge_request"].nil? && !helper.security_mr? + return if helper.security_mr? + + cherry_pick_against_stable_branch = helper.cherry_pick_mr? && helper.stable_branch? + + if yaml["merge_request"].nil? mr_line = raw_file.lines.find_index("merge_request:\n") if mr_line @@ -43,7 +47,7 @@ def check_changelog_yaml(path) else message "Consider setting `merge_request` to #{gitlab.mr_json["iid"]} in #{gitlab.html_link(path)}. #{SEE_DOC}" end - elsif yaml["merge_request"] != gitlab.mr_json["iid"] && !helper.security_mr? + elsif yaml["merge_request"] != gitlab.mr_json["iid"] && !cherry_pick_against_stable_branch fail "Merge request ID was not set to #{gitlab.mr_json["iid"]}! #{SEE_DOC}" end rescue Psych::SyntaxError, Psych::DisallowedClass, Psych::BadAlias |