lita-github-pinger 0.4.4 → 0.4.5
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/lib/lita/handlers/github_pinger.rb +4 -9
- data/lita-github-pinger.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3556d923607a29aaf15e8626ec2e5ad8f03dddd7
|
4
|
+
data.tar.gz: 6fa661f441852318601acd4b180f930688f08d96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 525dbf276fd727ec59ce6936d03a5c730c0f7a214e6e584ea75df8d1355918906c09adfe70cb0fd92afc248911dfcd610a3dfb8eeda3bcc956663c9f64306711
|
7
|
+
data.tar.gz: 58a7d7259c980d3ac757be4a6e020b45ede92a4cebd6e3446d42ea9278c64de2272307f7b3ddd2f70918eaa7741e2040229bae7c4588d93633fce2ff04212f99
|
@@ -8,14 +8,9 @@ module Lita
|
|
8
8
|
|
9
9
|
def ghping(request, response)
|
10
10
|
|
11
|
-
puts "
|
12
|
-
puts "GitHub hook received. Parsing body... "
|
13
|
-
|
11
|
+
puts "########## New GH PR Event! ##########"
|
14
12
|
body = MultiJson.load(request.body)
|
15
13
|
|
16
|
-
print "Done."
|
17
|
-
puts "######################################"
|
18
|
-
|
19
14
|
if body["comment"]
|
20
15
|
puts "Detected a comment. Extracting data... "
|
21
16
|
|
@@ -45,7 +40,7 @@ module Lita
|
|
45
40
|
|
46
41
|
# get each @mentioned username in the comment
|
47
42
|
mentions = comment.split("@")[1..-1].map { |snip| snip.split(" ").first }
|
48
|
-
|
43
|
+
puts "Done. (Got #{mentions})"
|
49
44
|
|
50
45
|
# add them to the list of usernames to ping
|
51
46
|
usernames_to_ping = usernames_to_ping.concat(mentions).uniq
|
@@ -57,7 +52,7 @@ module Lita
|
|
57
52
|
# slackify all of the users
|
58
53
|
usernames_to_ping.map! { |user| github_to_slack_username(user) }
|
59
54
|
|
60
|
-
|
55
|
+
puts "Done. (Got #{usernames_to_ping})"
|
61
56
|
|
62
57
|
puts "Starting pinging process for each engineer..."
|
63
58
|
usernames_to_ping.compact.each do |user|
|
@@ -112,7 +107,7 @@ module Lita
|
|
112
107
|
if user = Lita::User.fuzzy_find(username)
|
113
108
|
source = Lita::Source.new(user: user)
|
114
109
|
robot.send_message(source, content)
|
115
|
-
|
110
|
+
puts "Done."
|
116
111
|
else
|
117
112
|
alert_eng_pr("Could not find user with name #{username}, please configure everbot.")
|
118
113
|
end
|
data/lita-github-pinger.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "lita-github-pinger"
|
3
|
-
spec.version = "0.4.
|
3
|
+
spec.version = "0.4.5"
|
4
4
|
spec.authors = ["Taylor Lapeyre"]
|
5
5
|
spec.email = ["taylorlapeyre@gmail.com"]
|
6
6
|
spec.description = "A Lita handler that detects github comment notifications and regurgitates a ping to the correct slack username."
|