Commit 91b659d9 authored by samdbeckham's avatar samdbeckham Committed by Sam Beckham

Adds the ci_config dangerfile

parent c8776ac7
# frozen_string_literal: true
all_changed_files = helper.all_changed_files
def get_ci_config_files(files)
files.select do |file|
file.include?('lib/gitlab/ci')
end
end
schema_path = 'app/assets/javascripts/editor/schema/ci.json'
ci_config_files = get_ci_config_files(all_changed_files)
has_schema_update = all_changed_files.include?(schema_path)
return if ci_config_files.empty? || has_schema_update;
file_list = "- #{ci_config_files.map { |path| "`#{path}`" }.join("\n- ")}"
warn "This merge request changed CI config files but did not update the schema. Please consider updating [the schema](#{schema_path}) to reflect these changes:\n#{file_list}"
......@@ -5,6 +5,7 @@ module Tooling
module ProjectHelper
LOCAL_RULES ||= %w[
changelog
ci_config
database
documentation
duplicate_yarn_dependencies
......
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