lita-github-pinger 0.2.3 → 0.2.4
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 +14 -3
- 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: aaae30f11bb2634fe7b5c72fcdeaa52505148523
|
4
|
+
data.tar.gz: cd5ef8a6284537282e8eb77ace744ecd6855a8b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fb69d73e114072d171825202d3e35b87b8568e56eced5047e3ac438a5c592661b1652457e10c92cc17dc24cbcf40084d2e34d8d9144bd33f0b7de3e3b5cfcc0
|
7
|
+
data.tar.gz: 22f4cb87ac643648671797e76d6d8ee4648b78a72b136226d016ec03d0f1d253fc259b7b9b6468489b8ea597c0b2ce159b0e81642378503d75bf6a17af8aae49
|
@@ -6,13 +6,24 @@ module Lita
|
|
6
6
|
|
7
7
|
route(/@(\w*)/, :detect_comment, command: false)
|
8
8
|
|
9
|
-
http.
|
9
|
+
http.post "/ghping", :ghping
|
10
10
|
|
11
11
|
def ghping(request, response)
|
12
|
+
body = MultiJson.parse(request.body)
|
13
|
+
|
14
|
+
if body["events"].include?("pull_request_review_comment")
|
15
|
+
send_dm("taylor", "Pull Request Comment: ```#{body}```")
|
16
|
+
else
|
17
|
+
send_dm("taylor", "Pull Request Event: ```#{body}```")
|
18
|
+
end
|
19
|
+
|
20
|
+
response
|
21
|
+
end
|
22
|
+
|
23
|
+
def alert_eng_pr(message)
|
12
24
|
room = Lita::Room.fuzzy_find("eng")
|
13
25
|
source = Lita::Source.new(room: room)
|
14
|
-
robot.send_message(source,
|
15
|
-
response.body << "Hello, #{request.user_agent}!"
|
26
|
+
robot.send_message(source, message)
|
16
27
|
end
|
17
28
|
|
18
29
|
def send_dm(username, content)
|
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.2.
|
3
|
+
spec.version = "0.2.4"
|
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."
|