summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-08-24 20:54:55 +0000
committerRémy Coutable <remy@rymai.me>2018-08-24 20:54:55 +0000
commit705da921ba0ec9ab0ab7b20a0a555cb2941b9d56 (patch)
tree01083c6e569472fce1fee88dbbb06fc886b1c9c4 /danger
parent71ba763adb558b6cece831489bfc37918751cc63 (diff)
downloadgitlab-ce-705da921ba0ec9ab0ab7b20a0a555cb2941b9d56.tar.gz
Drop WIP from changelog command in Danger comment
Diffstat (limited to 'danger')
-rw-r--r--danger/changelog/Dangerfile6
1 files changed, 4 insertions, 2 deletions
diff --git a/danger/changelog/Dangerfile b/danger/changelog/Dangerfile
index a1f94dc6004..713ed95a04c 100644
--- a/danger/changelog/Dangerfile
+++ b/danger/changelog/Dangerfile
@@ -53,9 +53,11 @@ end
changelog_needed = (gitlab.mr_labels & NO_CHANGELOG_LABELS).empty?
changelog_found = git.added_files.find { |path| path =~ %r{\A(ee/)?(changelogs/unreleased)(-ee)?/} }
+mr_title = gitlab.mr_json["title"].gsub(/^WIP: */, '')
+
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: gitlab.mr_json["title"], labels: presented_no_changelog_labels)
+ format(CREATE_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], mr_title: mr_title, labels: presented_no_changelog_labels)
end
if changelog_needed
@@ -63,6 +65,6 @@ if changelog_needed
check_changelog(changelog_found)
else
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)
+ format(CREATE_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], mr_title: mr_title, labels: presented_no_changelog_labels)
end
end