From 543e7ef27a9d9e01928b11294443f92edc8638e9 Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Mon, 6 May 2024 23:51:13 -0500 Subject: [PATCH] (maint) auto disable provision_service --- exe/matrix_from_metadata_v3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exe/matrix_from_metadata_v3 b/exe/matrix_from_metadata_v3 index 83f3442..dae4edc 100755 --- a/exe/matrix_from_metadata_v3 +++ b/exe/matrix_from_metadata_v3 @@ -104,8 +104,9 @@ default_options = { begin Action.init - # hidden argument to setup puppetlabs org defaults - default_options[:'provision-exclude'] = 'provision_service' if ARGV.reject! { |x| x == '--puppetlabs' }.nil? + # default disable provision_service if puppetlabs is not the owner + default_options[:'provision-exclude'] = 'provision_service' \ + if ARGV.reject! { |x| x == '--puppetlabs' }.nil? && !['puppetlabs'].include?(ENV.fetch('GITHUB_REPOSITORY_OWNER', nil)) # apply default_options if not overridden on the command line default_options.each do |arg, value|