Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
Diffstat (limited to 'danger')
-rw-r--r--danger/changelog/Dangerfile14
1 files changed, 7 insertions, 7 deletions
diff --git a/danger/changelog/Dangerfile b/danger/changelog/Dangerfile
index 0374de24520..a1f94dc6004 100644
--- a/danger/changelog/Dangerfile
+++ b/danger/changelog/Dangerfile
@@ -2,15 +2,13 @@
require 'yaml'
-NO_CHANGELOG_LABELS = %w[backstage QA test].freeze
+NO_CHANGELOG_LABELS = %w[backstage Documentation QA test].freeze
SEE_DOC = "See [the documentation](https://docs.gitlab.com/ce/development/changelog.html).".freeze
-MISSING_CHANGELOG_MESSAGE = <<~MSG.freeze
-**[CHANGELOG missing](https://docs.gitlab.com/ce/development/changelog.html).**
-
+CREATE_CHANGELOG_MESSAGE = <<~MSG.freeze
You can create one with:
```
-bin/changelog -m %<mr_iid>s
+bin/changelog -m %<mr_iid>s "%<mr_title>s"
```
If your merge request doesn't warrant a CHANGELOG entry,
@@ -56,13 +54,15 @@ changelog_needed = (gitlab.mr_labels & NO_CHANGELOG_LABELS).empty?
changelog_found = git.added_files.find { |path| path =~ %r{\A(ee/)?(changelogs/unreleased)(-ee)?/} }
if git.modified_files.include?("CHANGELOG.md")
- fail "CHANGELOG.md was edited. Please remove the additions and create an entry with `bin/changelog -m #{gitlab.mr_json["iid"]}` instead."
+ 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: gitlab.mr_json["title"], labels: presented_no_changelog_labels)
end
if changelog_needed
if changelog_found
check_changelog(changelog_found)
else
- warn format(MISSING_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], labels: presented_no_changelog_labels)
+ warn "**[CHANGELOG missing](https://docs.gitlab.com/ce/development/changelog.html).**\n\n" +
+ format(CREATE_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], mr_title: gitlab.mr_json["title"], labels: presented_no_changelog_labels)
end
end