ruboty-github_create_deployment 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3847562a0b883888b6e869c4814b130574a6e7fbf3129b1990420994d7c2485
|
4
|
+
data.tar.gz: 9498d9bd451550ca8a8437e21714bdc728881cd038835dc3ce5460735152dcc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8165c87309b73457d167574fda7a4584699bf26c20e084c64da8be962aad0f4e59286d47db2338157e79fad72986be31f7b8cb64186dc7b89f4e40fe18b77f52
|
7
|
+
data.tar.gz: 609fd1eeb95090010cb2145e7ff7c1d141f2d4a44d7f884c5be5e1f1c9c8d47097523e9d5f3ecff5949578ba4bc65ec133fcb6555e3a6b177a4a68e3545e7afb
|
@@ -13,6 +13,10 @@ module Ruboty
|
|
13
13
|
end
|
14
14
|
|
15
15
|
private def create
|
16
|
+
Ruboty.logger.debug("repo: #{repository}")
|
17
|
+
Ruboty.logger.debug("ref: #{ref}")
|
18
|
+
Ruboty.logger.debug("environment: #{environment}")
|
19
|
+
|
16
20
|
client.create_deployment(
|
17
21
|
repository,
|
18
22
|
ref,
|
@@ -22,16 +26,19 @@ module Ruboty
|
|
22
26
|
}.compact,
|
23
27
|
)
|
24
28
|
|
25
|
-
message.reply("Created
|
29
|
+
message.reply("Created #{deployments_url}")
|
26
30
|
rescue Octokit::Unauthorized
|
27
31
|
message.reply("Failed in authentication (401)")
|
28
32
|
rescue Octokit::NotFound
|
29
33
|
message.reply("Could not find that repository")
|
30
34
|
rescue => exception
|
31
|
-
Ruboty.logger.debug("repository: #{repository}, ref: #{ref}, environment: #{environment}")
|
32
35
|
message.reply("Failed by #{exception.class}")
|
33
36
|
end
|
34
37
|
|
38
|
+
private def deployments_url
|
39
|
+
"https://github.com/#{repository}/deployments"
|
40
|
+
end
|
41
|
+
|
35
42
|
private def environment
|
36
43
|
message[:environment]
|
37
44
|
end
|
@@ -4,7 +4,7 @@ module Ruboty
|
|
4
4
|
module Handlers
|
5
5
|
class GithubCreateDeployment < Base
|
6
6
|
on(
|
7
|
-
/create deployment
|
7
|
+
/create github deployment (?<repo>\S+):(?<ref>\S+)( to (?<environment>\S+))?\z/,
|
8
8
|
name: "create_deployment",
|
9
9
|
description: "Generate deployment on GitHub",
|
10
10
|
)
|