Class: Fastlane::Actions::SqCiToolsNotifyAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::SqCiToolsNotifyAction
- Defined in:
- lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(_) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
61 62 63 |
# File 'lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb', line 61 def self. ['Semen Kologrivov'] end |
.available_options ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb', line 40 def self. [ FastlaneCore::ConfigItem.new( key: :message, description: 'Message to send', optional: false, type: String ), FastlaneCore::ConfigItem.new( key: :links, description: 'Links to the end of message', optional: true, type: Array ) ] end |
.description ⇒ Object
32 33 34 |
# File 'lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb', line 32 def self.description 'Send message into a messengers' end |
.details ⇒ Object
36 37 38 |
# File 'lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb', line 36 def self.details '' end |
.is_supported?(_) ⇒ Boolean
65 66 67 |
# File 'lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb', line 65 def self.is_supported?(_) true end |
.return_value ⇒ Object
57 58 59 |
# File 'lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb', line 57 def self.return_value '' end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fastlane/plugin/sq_ci_tools/actions/sq_ci_tools_notify_action.rb', line 7 def self.run(params) = params[:message] = (params[:links] || []) .select { |link| !link[:url].nil? } .map { |link| "#{link[:name] || 'Ссылка'}: #{link[:url]}" } .join("\n\n") = "#{}\n\n#{}" begin other_action.( message: ) rescue => e puts "Send message via Telegram error: #{e.}" end begin other_action.( message: ) rescue => e puts "Send message via Max error: #{e.}" end end |