Merge branch 'exclude-documentation-from-danger' into 'master'

Update dangerfile to exclude docs ci yaml

See merge request gitlab-org/gitlab-ce!30335
This commit is contained in:
Nick Thomas 2019-07-06 13:32:50 +00:00
commit bd69c9197c

View file

@ -1,7 +1,7 @@
# rubocop:disable Style/SignalException
# frozen_string_literal: true
has_only_docs_changes = helper.all_changed_files.all? { |file| file.start_with?('doc/') }
has_only_docs_changes = helper.all_changed_files.all? { |file| file.start_with?('doc/', '.gitlab/ci/docs.gitlab-ci.yml') }
is_docs_only_branch = gitlab.branch_for_head =~ /(^docs[\/-].*|.*-docs$)/
if is_docs_only_branch && !has_only_docs_changes