fastlane-plugin-jandi_webhook 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0764fbdd45918aaa90c0f6839724c5eaa3128e7de6d96928e9b906332665803
4
- data.tar.gz: '060880088f9b044cf7187344e5cb22f6d2d5af7791b71c2eb5abe925b8b753f7'
3
+ metadata.gz: f43e0a14d6e4d1f0af31e926ce0465c3fd7344a7e5772b82a1a5cdeb78a5be39
4
+ data.tar.gz: 993adc5586d1cea2612eaf986e1b4b68fc491bfe355ae229ed9837d80502e15d
5
5
  SHA512:
6
- metadata.gz: 5562d8757d51be4c9185bcea4c71bd737d3eb1d010437b0e5e78eddb42f13037b2a0cd4255bc49f218c8dffea515087988a4c592efe937f1fa65ce4267773448
7
- data.tar.gz: 9ceadf178e144ef80496562c43ffc1042eed25c7da4badd6844e9c3299fef78c03b8ef5975954e2da938e4529dc7c4ae830026f1255796d53a5f3a5bfda22865
6
+ metadata.gz: 752cf818258f360ce6f44054432f0d13354c771f0f9213a334e33b7eb2e2785d7dd93e274aa2f540ddd9af79115903e7e239ce8bd456dddf3f65c57b1bde1eda
7
+ data.tar.gz: 13d844e0abfc04217cb7a1ab4d70919893572a4a2f7bf517edce92e733421c171743c3b60472c12f13c08160edbea7e578cbca24147b766568e85512fd6fbce8
@@ -1,11 +1,36 @@
1
1
  require 'fastlane/action'
2
2
  require_relative '../helper/jandi_webhook_helper'
3
+ require 'json'
4
+ require 'httparty'
3
5
 
4
6
  module Fastlane
5
7
  module Actions
6
8
  class JandiWebhookAction < Action
7
9
  def self.run(params)
8
10
  UI.message("The jandi_webhook plugin is working!")
11
+
12
+ headers = {
13
+ "Content-Type" => "application/json",
14
+ "Accept" => "application/vnd.tosslab.jandi-v2+json"
15
+ }
16
+
17
+ message = {
18
+ body: "#{params[:appName]} 테스트 앱이 배포되었습니다.",
19
+ connectColor: "#ea002c",
20
+ connectInfo: [
21
+ {
22
+ title: "App Tester를 확인해 주세요.",
23
+ description: "#{params[:version]} for #{params[:platform]}"
24
+ }
25
+ ]
26
+ }
27
+
28
+ UI.message(message.to_json)
29
+ UI.message("#{params[:jandi_url]} for #{params[:platform]} ")
30
+
31
+ Send the request
32
+ response = HTTParty.post(params[:jandi_url], :headers => headers, body: message.to_json)
33
+ UI.message("response : #{response}")
9
34
  end
10
35
 
11
36
  def self.description
@@ -13,7 +38,7 @@ module Fastlane
13
38
  end
14
39
 
15
40
  def self.authors
16
- ["norte13_imform"]
41
+ ["respecu"]
17
42
  end
18
43
 
19
44
  def self.return_value
@@ -27,11 +52,29 @@ module Fastlane
27
52
 
28
53
  def self.available_options
29
54
  [
30
- # FastlaneCore::ConfigItem.new(key: :your_option,
31
- # env_name: "JANDI_WEBHOOK_YOUR_OPTION",
32
- # description: "A description of your option",
33
- # optional: false,
34
- # type: String)
55
+ FastlaneCore::ConfigItem.new(key: :jandi_url,
56
+ env_name: "JANDI_WEBHOOK_URL",
57
+ description: "webhook url for jandi",
58
+ optional: false,
59
+ type: String),
60
+
61
+ FastlaneCore::ConfigItem.new(key: :platform,
62
+ env_name: "DEPLOYMENT_PLATFORM",
63
+ description: "platform android or ios",
64
+ optional: false,
65
+ type: String),
66
+
67
+ FastlaneCore::ConfigItem.new(key: :version,
68
+ env_name: "DEPLOYMENT_VERSION",
69
+ description: "app version",
70
+ optional: false,
71
+ type: String),
72
+
73
+ FastlaneCore::ConfigItem.new(key: :appName,
74
+ env_name: "APP_NAME",
75
+ description: "app name",
76
+ optional: false,
77
+ type: String)
35
78
  ]
36
79
  end
37
80
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module JandiWebhook
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-jandi_webhook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - respecu