summaryrefslogtreecommitdiff
path: root/lib/gitlab/danger/helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/danger/helper.rb')
-rw-r--r--lib/gitlab/danger/helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/danger/helper.rb b/lib/gitlab/danger/helper.rb
index 89f21e8bd23..d22f28ff7f2 100644
--- a/lib/gitlab/danger/helper.rb
+++ b/lib/gitlab/danger/helper.rb
@@ -64,7 +64,7 @@ module Gitlab
# - respond_to?(:gitlab)
# - respond_to?(:gitlab, true)
gitlab
- rescue NoMethodError
+ rescue NameError
nil
end
@@ -268,6 +268,10 @@ module Gitlab
def has_database_scoped_labels?(current_mr_labels)
current_mr_labels.any? { |label| label.start_with?('database::') }
end
+
+ def has_ci_changes?
+ changed_files(%r{\A(\.gitlab-ci\.yml|\.gitlab/ci/)}).any?
+ end
end
end
end