Drop WIP from changelog command in Danger comment
This commit is contained in:
parent
71ba763adb
commit
705da921ba
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue