From 95e18e32833de71b46d73ead66c8f13e261af3f4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 28 Apr 2020 18:09:35 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- danger/changelog/Dangerfile | 5 ++--- danger/specs/Dangerfile | 6 +----- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'danger') 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 %s "%s" ``` -Note: Merge requests with %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 %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 -- cgit v1.2.1