Commit c96c3e54 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '37340-consider-none-as-docs-only' into 'master'

Consider :none as docs only change

Closes #37340

See merge request gitlab-org/gitlab!21144
parents 3832a8ad 46403788
...@@ -29,8 +29,8 @@ def ce_port_changelog?(changelog_path) ...@@ -29,8 +29,8 @@ def ce_port_changelog?(changelog_path)
helper.ee? && !ee_changelog?(changelog_path) helper.ee? && !ee_changelog?(changelog_path)
end end
def docs_only_change? def categories_need_changelog?
helper.changes_by_category.keys == [:docs] (helper.changes_by_category.keys - %i[docs none]).any?
end end
def check_changelog(path) def check_changelog(path)
...@@ -59,7 +59,7 @@ def sanitized_mr_title ...@@ -59,7 +59,7 @@ def sanitized_mr_title
gitlab.mr_json["title"].gsub(/^WIP: */, '').gsub(/`/, '\\\`') gitlab.mr_json["title"].gsub(/^WIP: */, '').gsub(/`/, '\\\`')
end end
changelog_needed = !docs_only_change? && (gitlab.mr_labels & NO_CHANGELOG_LABELS).empty? changelog_needed = categories_need_changelog? && (gitlab.mr_labels & NO_CHANGELOG_LABELS).empty?
changelog_found = git.added_files.find { |path| path =~ %r{\A(ee/)?(changelogs/unreleased)(-ee)?/} } changelog_found = git.added_files.find { |path| path =~ %r{\A(ee/)?(changelogs/unreleased)(-ee)?/} }
if git.modified_files.include?("CHANGELOG.md") if git.modified_files.include?("CHANGELOG.md")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment