diff options
Diffstat (limited to 'danger/changelog/Dangerfile')
-rw-r--r-- | danger/changelog/Dangerfile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/danger/changelog/Dangerfile b/danger/changelog/Dangerfile index c8474157fa5..377f3592d56 100644 --- a/danger/changelog/Dangerfile +++ b/danger/changelog/Dangerfile @@ -46,7 +46,7 @@ def check_changelog_path(path) ee_changes = helper.all_ee_changes.dup ee_changes.delete(path) - if ee_changes.any? && !changelog.ee_changelog? && !changelog.db_changes? + if ee_changes.any? && !changelog.ee_changelog? && !changelog.required? warn "This MR has a Changelog file outside `ee/`, but code changes in `ee/`. Consider moving the Changelog file into `ee/`." end @@ -54,7 +54,7 @@ def check_changelog_path(path) warn "This MR has a Changelog file in `ee/`, but no code changes in `ee/`. Consider moving the Changelog file outside `ee/`." end - if ee_changes.any? && changelog.ee_changelog? && changelog.db_changes? + if ee_changes.any? && changelog.ee_changelog? && changelog.required_reasons.include?(:db_changes) warn "This MR has a Changelog file inside `ee/`, but there are database changes which [requires](https://docs.gitlab.com/ee/development/changelog.html#what-warrants-a-changelog-entry) the Changelog placement to be outside of `ee/`. Consider moving the Changelog file outside `ee/`." end end @@ -69,7 +69,7 @@ if changelog_found check_changelog_yaml(changelog_found) check_changelog_path(changelog_found) elsif changelog.required? - fail changelog.required_text + changelog.required_texts.each { |_, text| fail(text) } # rubocop:disable Lint/UnreachableLoop elsif changelog.optional? message changelog.optional_text end |