From 2ce91dc6729023ed220827644e8d95a98ab73dfc Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Wed, 2 Oct 2024 06:12:01 -0400 Subject: [PATCH] Move is_scheduled_release to ddg_apple_automation_helper --- .../actions/asana_create_action_item_action.rb | 8 ++------ .../actions/asana_log_message_action.rb | 8 ++------ .../ddg_apple_automation/actions/tag_release_action.rb | 8 ++------ .../helper/ddg_apple_automation_helper.rb | 8 ++++++++ 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/lib/fastlane/plugin/ddg_apple_automation/actions/asana_create_action_item_action.rb b/lib/fastlane/plugin/ddg_apple_automation/actions/asana_create_action_item_action.rb index 43eeb0d..613d304 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/actions/asana_create_action_item_action.rb +++ b/lib/fastlane/plugin/ddg_apple_automation/actions/asana_create_action_item_action.rb @@ -98,6 +98,7 @@ def self.details def self.available_options [ FastlaneCore::ConfigItem.asana_access_token, + FastlaneCore::ConfigItem.is_scheduled_release, FastlaneCore::ConfigItem.new(key: :task_url, description: "Asana release task URL", optional: false, @@ -127,12 +128,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :github_handle, description: "Github user handle", optional: true, - type: String), - FastlaneCore::ConfigItem.new(key: :is_scheduled_release, - description: "Indicates whether the release was scheduled or started manually", - optional: true, - type: Boolean, - default_value: false) + type: String) ] end diff --git a/lib/fastlane/plugin/ddg_apple_automation/actions/asana_log_message_action.rb b/lib/fastlane/plugin/ddg_apple_automation/actions/asana_log_message_action.rb index 9c7dde5..81f9399 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/actions/asana_log_message_action.rb +++ b/lib/fastlane/plugin/ddg_apple_automation/actions/asana_log_message_action.rb @@ -78,6 +78,7 @@ def self.details def self.available_options [ FastlaneCore::ConfigItem.asana_access_token, + FastlaneCore::ConfigItem.is_scheduled_release, FastlaneCore::ConfigItem.new(key: :task_url, description: "Asana release task URL", optional: false, @@ -99,12 +100,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :github_handle, description: "Github user handle", optional: true, - type: String), - FastlaneCore::ConfigItem.new(key: :is_scheduled_release, - description: "Indicates whether the release was scheduled or started manually", - optional: true, - type: Boolean, - default_value: false) + type: String) ] end diff --git a/lib/fastlane/plugin/ddg_apple_automation/actions/tag_release_action.rb b/lib/fastlane/plugin/ddg_apple_automation/actions/tag_release_action.rb index dbae8ab..bb63684 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/actions/tag_release_action.rb +++ b/lib/fastlane/plugin/ddg_apple_automation/actions/tag_release_action.rb @@ -209,6 +209,7 @@ def self.available_options [ FastlaneCore::ConfigItem.asana_access_token, FastlaneCore::ConfigItem.github_token, + FastlaneCore::ConfigItem.is_scheduled_release, FastlaneCore::ConfigItem.platform, FastlaneCore::ConfigItem.new(key: :asana_task_url, description: "Asana release task URL", @@ -237,12 +238,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :is_prerelease, description: "Is this a pre-release? (a.k.a. internal release)", optional: false, - type: Boolean), - FastlaneCore::ConfigItem.new(key: :is_scheduled_release, - description: "Indicates whether the release was scheduled or started manually", - optional: true, - type: Boolean, - default_value: false) + type: Boolean) ] end diff --git a/lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb b/lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb index ac6897b..5dae537 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb +++ b/lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb @@ -372,5 +372,13 @@ def self.platform UI.user_error!("platform must be equal to 'ios' or 'macos'") unless ['ios', 'macos'].include?(value.to_s) end) end + + def self.is_scheduled_release + FastlaneCore::ConfigItem.new(key: :is_scheduled_release, + description: "Indicates whether the release was scheduled or started manually", + optional: true, + type: Boolean, + default_value: false) + end end end