diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-14 21:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-14 21:09:21 +0300 |
commit | c3ccd2fdf136f7b3962ef5243ed6ce01de47d8ef (patch) | |
tree | 4d8b1df9d6b4bc09edcf8ae610e014b36a2d4269 /danger | |
parent | 15c1cc886c5785d49f2a6dae064a1e8290f59f46 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r-- | danger/plugins/todos.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/danger/plugins/todos.rb b/danger/plugins/todos.rb index b31f147f2af..06b76321f95 100644 --- a/danger/plugins/todos.rb +++ b/danger/plugins/todos.rb @@ -5,7 +5,11 @@ require_relative '../../tooling/danger/outdated_todo' module Danger class Todos < ::Danger::Plugin def check_outdated_todos(filenames) - Tooling::Danger::OutdatedTodo.new(filenames, context: self).check + Tooling::Danger::OutdatedTodo.new(filenames, context: self, allow_fail: from_lefthook?).check + end + + def from_lefthook? + %w[1 true].include?(ENV['FROM_LEFTHOOK']) end end end |