gh-events 0.3.4 → 0.3.6
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 +4 -4
- data/.ruby-version +1 -0
- data/Gemfile.lock +2 -2
- data/lib/gh/events/slack.rb +3 -3
- data/lib/gh/events/version.rb +1 -1
- data/res/slack.yml +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 116f89041743fea15d36e826e99dc1c798049ac2617ec4fa6630a1d706ed61da
|
|
4
|
+
data.tar.gz: 1a67414449a61032a8b92913a0bc8f4ab35a833fa11eb5c5e983c0d25c17fe09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ec384eb80b17e6adadcfd34f0c81802a2d97335a3c3f1a5cdd59502c989e22171a8672d27569839e54d55f49a573a8a80acafdca2f2ded7b03fd79e3b256653
|
|
7
|
+
data.tar.gz: 95d4384f0ed161cddc9fb4f3c706b12609bbbe22845599eca5d252aa6eb470ec69347d20bd888bee40b1efa54ac228360527434470daf589f9625d3ec1b4ef78
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.6.5
|
data/Gemfile.lock
CHANGED
data/lib/gh/events/slack.rb
CHANGED
|
@@ -12,9 +12,9 @@ module GH::Events::Slack
|
|
|
12
12
|
type = GH::Events.typeof(event).to_s
|
|
13
13
|
|
|
14
14
|
# unify
|
|
15
|
-
event.ref_type = 'branch' if event.ref
|
|
16
|
-
event.ref_type = 'tag' if event.ref
|
|
17
|
-
event.ref = event.ref
|
|
15
|
+
event.ref_type = 'branch' if event.ref&.match(/^refs\/heads\//)
|
|
16
|
+
event.ref_type = 'tag' if event.ref&.match(/^refs\/tags\//)
|
|
17
|
+
event.ref = event.ref&.split('/')&.last
|
|
18
18
|
|
|
19
19
|
template = (templates[type] || "No template for type: #{type}.")
|
|
20
20
|
render(template, event)
|
data/lib/gh/events/version.rb
CHANGED
data/res/slack.yml
CHANGED
|
@@ -5,8 +5,8 @@ unknown: >-
|
|
|
5
5
|
|
|
6
6
|
push: >-
|
|
7
7
|
_<%= pusher.name %>_ <%= forced ? 'force-' : '' %>pushed
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
<% if ref_type == 'branch' %><%= num = size || commits.count %> commit<%= num > 1 ? 's' : '' %> to<% end %>
|
|
9
|
+
<%= ref_type %> `<%= ref %>`
|
|
10
10
|
on <<%= repository.html_url %>|<%= repository.full_name %>>
|
|
11
11
|
:star: <%= repository.stargazers_count %>
|
|
12
12
|
:eye: <%= repository.watchers_count %>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gh-events
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Phil Hofmann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-11-
|
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -62,6 +62,7 @@ extra_rdoc_files: []
|
|
|
62
62
|
files:
|
|
63
63
|
- ".gitignore"
|
|
64
64
|
- ".rspec"
|
|
65
|
+
- ".ruby-version"
|
|
65
66
|
- Gemfile
|
|
66
67
|
- Gemfile.lock
|
|
67
68
|
- README.md
|
|
@@ -97,8 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
97
98
|
- !ruby/object:Gem::Version
|
|
98
99
|
version: '0'
|
|
99
100
|
requirements: []
|
|
100
|
-
|
|
101
|
-
rubygems_version: 2.7.3
|
|
101
|
+
rubygems_version: 3.0.3
|
|
102
102
|
signing_key:
|
|
103
103
|
specification_version: 4
|
|
104
104
|
summary: Determine Github event types by their payload.
|