Loading lib/danger/rules/z_add_labels/Dangerfile +3 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,9 @@ def post_labels(labels) helper.mr_iid, add_labels: labels.join(",")) rescue Gitlab::Error::Forbidden warn("This Merge Request needs to be labelled with #{helper.labels_list(labels)}. Please request a reviewer or maintainer to add them.") warn("This merge request needs to be labelled with #{helper.labels_list(labels)}. Please request a reviewer or maintainer to add them.") end puts "helper.labels_to_add: #{helper.labels_to_add}" post_labels(helper.labels_to_add) if helper.labels_to_add.any? lib/gitlab/dangerfiles.rb +3 −3 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ module Gitlab danger_plugin.import_plugin(File.expand_path("../danger/plugins/*.rb", __dir__)) Dir.glob(File.expand_path("danger/plugins/*.rb", config.project_root)).sort.each do |path| puts "Importing plugin at #{path}" if dangerfile.verbose puts "Importing plugin at #{path}" danger_plugin.import_plugin(path) end end Loading Loading @@ -87,10 +87,10 @@ module Gitlab return if helper_plugin.release_automation? rules = filtered_rules(only, except) puts "Running rules: #{rules}\n" if dangerfile.verbose puts "Running rules: #{rules}\n" rules.each do |rule, path| puts "Importing rule #{rule} at #{path}" if dangerfile.verbose puts "Importing rule #{rule} at #{path}" danger_plugin.import_dangerfile(path: path) end end Loading Loading
lib/danger/rules/z_add_labels/Dangerfile +3 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,9 @@ def post_labels(labels) helper.mr_iid, add_labels: labels.join(",")) rescue Gitlab::Error::Forbidden warn("This Merge Request needs to be labelled with #{helper.labels_list(labels)}. Please request a reviewer or maintainer to add them.") warn("This merge request needs to be labelled with #{helper.labels_list(labels)}. Please request a reviewer or maintainer to add them.") end puts "helper.labels_to_add: #{helper.labels_to_add}" post_labels(helper.labels_to_add) if helper.labels_to_add.any?
lib/gitlab/dangerfiles.rb +3 −3 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ module Gitlab danger_plugin.import_plugin(File.expand_path("../danger/plugins/*.rb", __dir__)) Dir.glob(File.expand_path("danger/plugins/*.rb", config.project_root)).sort.each do |path| puts "Importing plugin at #{path}" if dangerfile.verbose puts "Importing plugin at #{path}" danger_plugin.import_plugin(path) end end Loading Loading @@ -87,10 +87,10 @@ module Gitlab return if helper_plugin.release_automation? rules = filtered_rules(only, except) puts "Running rules: #{rules}\n" if dangerfile.verbose puts "Running rules: #{rules}\n" rules.each do |rule, path| puts "Importing rule #{rule} at #{path}" if dangerfile.verbose puts "Importing rule #{rule} at #{path}" danger_plugin.import_dangerfile(path: path) end end Loading