lita-github-pinger 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/github_pinger.rb +22 -1
- 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: 6d3ecc0b40f14f05794f14b9523701362522db6e
|
4
|
+
data.tar.gz: 3bcd8723b6e69fd9abd4b0bf0ca566e26e1344a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79a3cd94cdfe806deed670c48eb009cac59165d42ff31ecd9814e953c0fc14505d01e7d7d4aa40dd0a8c13cffa7e32d1fb47497848b0fadd487cac1072cc0934
|
7
|
+
data.tar.gz: 719098b48575a6a1310d4a9089d1d718a9b377df0cb991edb86984fcb7b0a83553b46f3fc29d7be65ffa422b3f8e5303ab13fd9011c1abe2f6d8db392173f9db
|
@@ -10,7 +10,28 @@ module Lita
|
|
10
10
|
|
11
11
|
def ghping(request, response)
|
12
12
|
body = MultiJson.load(request.body)
|
13
|
-
|
13
|
+
|
14
|
+
if body["comment"]
|
15
|
+
pr_url = body["pull_request"]["html_url"]
|
16
|
+
pr_owner = body["pull_request"]["user"]["login"]
|
17
|
+
commenter = body["content"]["user"]["login"]
|
18
|
+
comment = body["comment"]["body"]
|
19
|
+
|
20
|
+
pr_owner = config.engineers.select do |eng|
|
21
|
+
eng[:github] == pr_owner
|
22
|
+
end.first[:slack]
|
23
|
+
|
24
|
+
commenter = config.engineers.select do |eng|
|
25
|
+
eng[:github] == commenter
|
26
|
+
end.first[:slack]
|
27
|
+
|
28
|
+
message = "(to #{pr_owner}) New PR comment from #{commenter}:\n"
|
29
|
+
message += "#{pr_url}\n> #{comment}"
|
30
|
+
|
31
|
+
send_dm("taylor", message)
|
32
|
+
end
|
33
|
+
|
34
|
+
|
14
35
|
response
|
15
36
|
end
|
16
37
|
|
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.3.
|
3
|
+
spec.version = "0.3.2"
|
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."
|