summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-28 18:09:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-28 18:09:35 +0000
commit95e18e32833de71b46d73ead66c8f13e261af3f4 (patch)
treebf61062dc1ae8ec2a25b28cd6385190661d3b37c /danger
parent37ae6b54ba524c438d1b756ce3ca29bbcec4e897 (diff)
downloadgitlab-ce-95e18e32833de71b46d73ead66c8f13e261af3f4.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r--danger/changelog/Dangerfile5
-rw-r--r--danger/specs/Dangerfile6
2 files changed, 3 insertions, 8 deletions
diff --git a/danger/changelog/Dangerfile b/danger/changelog/Dangerfile
index 210fe24c1e3..9bdad75b8e0 100644
--- a/danger/changelog/Dangerfile
+++ b/danger/changelog/Dangerfile
@@ -17,7 +17,6 @@ If you want to create a changelog entry for GitLab EE, run the following instead
bin/changelog --ee -m %<mr_iid>s "%<mr_title>s"
```
-Note: Merge requests with %<labels>s do not trigger this check.
MSG
def check_changelog_yaml(path)
@@ -57,7 +56,7 @@ end
if git.modified_files.include?("CHANGELOG.md")
fail "**CHANGELOG.md was edited.** Please remove the additions and create a CHANGELOG entry.\n\n" +
- format(CREATE_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], mr_title: sanitized_mr_title, labels: changelog.presented_no_changelog_labels)
+ format(CREATE_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], mr_title: sanitized_mr_title)
end
changelog_found = changelog.found
@@ -67,5 +66,5 @@ if changelog_found
check_changelog_path(changelog_found)
elsif changelog.needed?
message "**[CHANGELOG missing](https://docs.gitlab.com/ee/development/changelog.html)**: If this merge request [doesn't need a CHANGELOG entry](https://docs.gitlab.com/ee/development/changelog.html#what-warrants-a-changelog-entry), feel free to ignore this message.\n\n" +
- format(CREATE_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], mr_title: sanitized_mr_title, labels: changelog.presented_no_changelog_labels)
+ format(CREATE_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], mr_title: sanitized_mr_title)
end
diff --git a/danger/specs/Dangerfile b/danger/specs/Dangerfile
index 50887c44b3e..7803fad8472 100644
--- a/danger/specs/Dangerfile
+++ b/danger/specs/Dangerfile
@@ -7,14 +7,10 @@ That's OK as long as you're refactoring existing code,
but please consider adding any of the %<labels>s labels.
MSG
-def presented_no_changelog_labels
- NO_SPECS_LABELS.map { |label| "~#{label}" }.join(', ')
-end
-
has_app_changes = !helper.all_changed_files.grep(%r{\A(ee/)?(app|lib|db/(geo/)?(post_)?migrate)/}).empty?
has_spec_changes = !helper.all_changed_files.grep(%r{\A(ee/)?spec/}).empty?
new_specs_needed = (gitlab.mr_labels & NO_SPECS_LABELS).empty?
if has_app_changes && !has_spec_changes && new_specs_needed
- warn format(NO_NEW_SPEC_MESSAGE, labels: presented_no_changelog_labels), sticky: false
+ warn format(NO_NEW_SPEC_MESSAGE, labels: helper.labels_list(NO_SPECS_LABELS)), sticky: false
end