diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-21 06:10:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-21 06:10:16 +0300 |
commit | f2eb66fef8aa8cebea25bc9e671a1f146514682f (patch) | |
tree | ef3f5ad9803bb211acdfd9f0f013c987f43d8e97 /danger | |
parent | c7a46b04196859929e8e4c04fbcbf8490f228edf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r-- | danger/changelog/Dangerfile | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/danger/changelog/Dangerfile b/danger/changelog/Dangerfile index f9e65bbf4c7..971c6a2a7b9 100644 --- a/danger/changelog/Dangerfile +++ b/danger/changelog/Dangerfile @@ -4,21 +4,6 @@ require 'yaml' SEE_DOC = "See the [changelog documentation](https://docs.gitlab.com/ee/development/changelog.html)." -CREATE_CHANGELOG_MESSAGE = <<~MSG -If you want to create a changelog entry for GitLab FOSS, run the following: - -``` -bin/changelog -m %<mr_iid>s "%<mr_title>s" -``` - -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" -``` - -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. -MSG SUGGEST_MR_COMMENT = <<~SUGGEST_COMMENT ```suggestion @@ -70,13 +55,8 @@ def check_changelog_path(path) end end -def sanitized_mr_title - helper.sanitize_mr_title(gitlab.mr_json["title"]) -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) + fail changelog.modified_text end changelog_found = changelog.found @@ -84,7 +64,8 @@ changelog_found = changelog.found if changelog_found check_changelog_yaml(changelog_found) check_changelog_path(changelog_found) -elsif changelog.needed? - message "**[CHANGELOG missing](https://docs.gitlab.com/ee/development/changelog.html)**:\n\n" + - format(CREATE_CHANGELOG_MESSAGE, mr_iid: gitlab.mr_json["iid"], mr_title: sanitized_mr_title) +elsif changelog.required? + fail changelog.required_text +elsif changelog.optional? + message changelog.optional_text end |