Class: Fastlane::Actions::DingTalkMsgPushAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::DingTalkMsgPushAction
- Defined in:
- lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
39 40 41 |
# File 'lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb', line 39 def self. ["lingyou"] end |
.available_options ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb', line 52 def self. [ FastlaneCore::ConfigItem.new(key: :token, env_name: "DING_TALK_MSG_PUSH_TOKEN", description: "the dingtalk robot token", optional: false, type: String), FastlaneCore::ConfigItem.new(key: :text, env_name: "DING_TALK_MSG_PUSH_TEXT", description: "the content text send", optional: false, type: String), FastlaneCore::ConfigItem.new(key: :at_all, env_name: "DING_TALK_MSG_PUSH_AT_ALL", description: "at all user", is_string: false, default_value: false) ] end |
.description ⇒ Object
35 36 37 |
# File 'lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb', line 35 def self.description "dingTalk robot msg push tool" end |
.details ⇒ Object
47 48 49 50 |
# File 'lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb', line 47 def self.details # Optional: "钉钉推送工具" end |
.is_supported?(platform) ⇒ Boolean
72 73 74 75 76 77 78 |
# File 'lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb', line 72 def self.is_supported?(platform) # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform # # [:ios, :mac, :android].include?(platform) true end |
.return_value ⇒ Object
43 44 45 |
# File 'lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb', line 43 def self.return_value # If your method provides a return value, you can describe here what it does 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 |
# File 'lib/fastlane/plugin/ding_talk_msg_push/actions/ding_talk_msg_push_action.rb', line 7 def self.run(params) UI.("The ding_talk_msg_push plugin is working!") # UI.message(params.to_json) token = params[:token] text = params[:text] at_all = params[:at_all] == nil ? false : params[:at_all] curl = %Q{ curl 'https://oapi.dingtalk.com/robot/send?access_token=#{token}' \ -H 'Content-Type: application/json' \ -d ' { "msgtype": "text", "text": { "content": "#{text}", }, "at": { "isAtAll": #{at_all} } }' } UI.(curl) system curl end |