fastlane/lib/fastlane/actions/mailgun.rb in fastlane-2.97.0 vs fastlane/lib/fastlane/actions/mailgun.rb in fastlane-2.98.0

- old
+ new

@@ -89,12 +89,18 @@ is_string: true), FastlaneCore::ConfigItem.new(key: :attachment, env_name: "MAILGUN_ATTACHMENT", description: "Mail Attachment filenames, either an array or just one string", optional: true, - is_string: false) - + is_string: false), + FastlaneCore::ConfigItem.new(key: :custom_placeholders, + short_option: "-p", + env_name: "MAILGUN_CUSTOM_PLACEHOLDERS", + description: "Placeholders for template given as a hash", + default_value: {}, + is_string: false, + type: Hash) ] end def self.author "thiagolioy" @@ -138,10 +144,13 @@ app_link: options[:app_link] } hash[:success] = options[:success] hash[:ci_build_link] = options[:ci_build_link] + # concatenate with custom placeholders passed by user + hash = hash.merge(options[:custom_placeholders]) + # grabs module eth = Fastlane::ErbTemplateHelper # create html from template html_template_path = options[:template_path] @@ -169,9 +178,13 @@ success: true, message: "Mail Body", app_link: "http://www.myapplink.com", ci_build_link: "http://www.mycibuildlink.com", template_path: "HTML_TEMPLATE_PATH", + custom_placeholders: { + :var1 => 123, + :var2 => "string" + }, attachment: "dirname/filename.ext" )' ] end