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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0e6b46889f744e9cf0f4d52674ab3e41c6a1174
4
- data.tar.gz: d0a8acd2c45f6466381fbc510dc733e0a29f658e
3
+ metadata.gz: c02180295dcf0e5bcabbcc58ba346d4ffd352e12
4
+ data.tar.gz: f436e69420273ecb918a20e15f16c5a86f0bc6e2
5
5
  SHA512:
6
- metadata.gz: 4e180b9fa88a9147a276b487fae9f8fbdc3282355f08f76e2f8282412a2475c9e424fb9d2c8dc7573388e0301cd4f3f8275ae9157abb41f8aa0de1d81f512007
7
- data.tar.gz: b86922cf96fcc0945e022cce12fd22778431e522b7ea70f1e63efd212da84a721768308af2bd4dd1c5105d400e2422fbab623a070d893aa0a837bb1cb149b816
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
- # automatically include the creator of the PR
19
- usernames_to_ping = [thing["user"]["login"]]
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
- return
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}"
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-github-pinger"
3
- spec.version = "0.4.2"
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."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-github-pinger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Lapeyre