capistrano-deploybot 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano-deploybot/capistrano.rb +5 -2
- data/lib/capistrano-deploybot/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c316494b8c8c8798549de0b9ef00c521f76a8642e2845ef623b70ec6eb4485a
|
4
|
+
data.tar.gz: c776e2883344b3fd4d979f24dd23195d0fd05d85cc75cec3575b3986bf88d6f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cc31b6a29f976e62738dcaba5b487bff18d242c5d5101b2a0c7a8f38bca96e1e85a2aa20573e3d38f08a79a44f1cc250e0c38eb73f3203ff282682f0966f27d
|
7
|
+
data.tar.gz: 97ae53c66e9612886895c453de2e304215e7baa571af3033b7f0f927ded3ea56d74f5fdfe7ecbffbbedd3049fb796f449e23811e19dd402ed992895af1e5de86
|
@@ -7,6 +7,7 @@ module CapistranoDeploybot
|
|
7
7
|
class Capistrano
|
8
8
|
DEFAULT_OPTIONS = {
|
9
9
|
username: :autodeploy,
|
10
|
+
jira_url: nil,
|
10
11
|
environments: {
|
11
12
|
staging: {
|
12
13
|
slack_webhooks: [],
|
@@ -15,7 +16,7 @@ module CapistranoDeploybot
|
|
15
16
|
}
|
16
17
|
}
|
17
18
|
|
18
|
-
JIRA_TICKET_ID_REGEXP = /[A-Z]{2,}-\d
|
19
|
+
JIRA_TICKET_ID_REGEXP = /([A-Z]{2,}-\d+)/
|
19
20
|
|
20
21
|
def initialize(env)
|
21
22
|
@env = env
|
@@ -87,7 +88,9 @@ module CapistranoDeploybot
|
|
87
88
|
end
|
88
89
|
|
89
90
|
def payload_text(current_revision, previous_revision, deploy_target)
|
90
|
-
"Deployed to #{deploy_target}:\n" + `git shortlog #{previous_revision}..#{current_revision}`
|
91
|
+
message = "Deployed to #{deploy_target}:\n" + `git shortlog #{previous_revision}..#{current_revision}`
|
92
|
+
message = message.split("\n").map { |s| s.gsub(JIRA_TICKET_ID_REGEXP, '[\1]' + "(#{URI(@opts[:jira_url]).to_s.chomp('/')}/browse/" + '\1' + ')') }.join("\n") if @opts[:jira_url]
|
93
|
+
message
|
91
94
|
end
|
92
95
|
|
93
96
|
def post_to_webhook(url, payload)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-deploybot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Baćkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
requirements: []
|
57
|
-
rubygems_version: 3.
|
57
|
+
rubygems_version: 3.3.7
|
58
58
|
signing_key:
|
59
59
|
specification_version: 4
|
60
60
|
summary: Capistrano deploy integration for slack
|