diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-20 21:12:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-20 21:12:04 +0300 |
commit | bca3fb69e1e43c345ccac26a08ae1d374920020d (patch) | |
tree | d8df432f99e856c41061c8836773ae3d342367cd /danger | |
parent | c70a70ea42e3f8742623e690dcd74d17c7c3b0ed (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r-- | danger/metadata/Dangerfile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/danger/metadata/Dangerfile b/danger/metadata/Dangerfile index d2e85109d63..27dda687f6a 100644 --- a/danger/metadata/Dangerfile +++ b/danger/metadata/Dangerfile @@ -2,6 +2,8 @@ # rubocop:disable Style/SignalException +DEFAULT_BRANCH = 'master' + THROUGHPUT_LABELS = [ 'Community contribution', 'security', @@ -29,12 +31,12 @@ end has_milestone = !gitlab.mr_json["milestone"].nil? -unless has_milestone +unless has_milestone || (helper.security_mr? && gitlab.branch_for_base == DEFAULT_BRANCH) warn "This merge request does not refer to an existing milestone.", sticky: false end has_pick_into_stable_label = gitlab.mr_labels.find { |label| label.start_with?('Pick into') } -if gitlab.branch_for_base != "master" && !has_pick_into_stable_label && !helper.security_mr? - warn "Most of the time, merge requests should target `master`. Otherwise, please set the relevant `Pick into X.Y` label." +if gitlab.branch_for_base != DEFAULT_BRANCH && !has_pick_into_stable_label && !helper.security_mr? + warn "Most of the time, merge requests should target `#{DEFAULT_BRANCH}`. Otherwise, please set the relevant `Pick into X.Y` label." end |