fastlane-plugin-jandi_webhook 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f43e0a14d6e4d1f0af31e926ce0465c3fd7344a7e5772b82a1a5cdeb78a5be39
|
4
|
+
data.tar.gz: 993adc5586d1cea2612eaf986e1b4b68fc491bfe355ae229ed9837d80502e15d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
["
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
|