gh-events 0.3.8 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gh/events/slack.rb +2 -1
- data/lib/gh/events/version.rb +1 -1
- data/res/slack.yml +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5cf57e6ba3a08aafb7621eccddd5caa9d23dc2ef08a28946aed52a5d386349c
|
4
|
+
data.tar.gz: 60101c32e6d363aae13676305e8b3b79c3ec4780f7f9c0a38ad5551db628eac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f2a72933f62af883eb804e78a1b1bf8578fb1f1d12447665968ffc4fe2f609ae46234004b8287014f2cc8648dcd0d66214a85bad23cf893ef3ecd47c1a24613
|
7
|
+
data.tar.gz: 472672fd5e5dae021d33b804bd82013fe0ef1ce78fa0c07c8f9fb3ed1a4093953eb0b26cebf5b5c77c43cc6c2b15f544461b66d4aa57fc2012eaeb087640c559
|
data/Gemfile.lock
CHANGED
data/lib/gh/events/slack.rb
CHANGED
@@ -16,7 +16,8 @@ module GH::Events::Slack
|
|
16
16
|
event.ref_type = 'tag' if event.ref&.match(/^refs\/tags\//)
|
17
17
|
event.ref = event.ref&.split('/')&.last
|
18
18
|
|
19
|
-
template =
|
19
|
+
template = templates[[type, event.action]*'.']
|
20
|
+
template ||= (templates[type] || "No template for type: #{type}.")
|
20
21
|
render(template, event)
|
21
22
|
end
|
22
23
|
|
data/lib/gh/events/version.rb
CHANGED
data/res/slack.yml
CHANGED
@@ -38,6 +38,13 @@ issues: >-
|
|
38
38
|
<%= action %>
|
39
39
|
issue <<%= issue.url %>|<%= issue.title %>>
|
40
40
|
on <<%= repository.html_url %>|<%= repository.full_name %>>
|
41
|
+
<% if action == 'opened' %>| <%= issue.body %><% end %>
|
42
|
+
|
43
|
+
issues.labeled:
|
44
|
+
<<%= sender.html_url %>|<%= sender.login %>>
|
45
|
+
labeled
|
46
|
+
issue <<%= issue.url %>|<%= issue.title %>>
|
47
|
+
as `<%= label.name %>`
|
41
48
|
|
42
49
|
pull_request: >-
|
43
50
|
<<%= sender.html_url %>|<%= sender.login %>>
|