lita-github-pinger 0.4.2 → 0.4.3
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 +8 -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: c02180295dcf0e5bcabbcc58ba346d4ffd352e12
|
4
|
+
data.tar.gz: f436e69420273ecb918a20e15f16c5a86f0bc6e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 802a892a377b6e11434990d6735da9c462fdc4c7e04c616a0eb9f5db9e2fae3f7fc440ee9e6e322052de409c5eea17253a7a74506d5fba0c423031498df1f461
|
7
|
+
data.tar.gz: 7903b0a7d5c748291cb426637febfc76647f652e6be58bb30b4c75fb46b3f1d8ac759b923bad50153d0ef76b93f0cae3b549626ac5e38c09a9b2d517f9121c84
|
@@ -15,8 +15,13 @@ module Lita
|
|
15
15
|
comment = body["comment"]["body"]
|
16
16
|
commenter = github_to_slack_username(body["comment"]["user"]["login"])
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
usernames_to_ping = []
|
19
|
+
# automatically include the creator of the PR, unless he's
|
20
|
+
# commenting on his own PR
|
21
|
+
if body["comment"]["user"]["login"] != thing["user"]["login"]
|
22
|
+
usernames_to_ping << [thing["user"]["login"]]
|
23
|
+
end
|
24
|
+
|
20
25
|
|
21
26
|
# Is anyone mentioned in this comment?
|
22
27
|
if comment.include?("@")
|
@@ -36,7 +41,7 @@ module Lita
|
|
36
41
|
pref = find_engineer(slack: user)[:preference]
|
37
42
|
case pref
|
38
43
|
when "off"
|
39
|
-
|
44
|
+
# do nothing
|
40
45
|
when "dm", nil
|
41
46
|
private_message = "New PR comment from @#{commenter}:\n"
|
42
47
|
private_message += "#{pr_url}\n#{comment}"
|
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.3"
|
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."
|