lita-github-pinger 0.6.2 → 0.6.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/README.md +39 -3
- data/lib/lita/handlers/github_pinger.rb +1 -1
- data/lita-github-pinger.gemspec +1 -1
- data/spec/lita/handlers/github_pinger_spec.rb +2 -32
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75e14f956e1c1a43847dfd0f31e471edb07c81cf
|
4
|
+
data.tar.gz: 184b96182e4e65efa25c49a40bd47a27f8dec7ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ed7afa80170760c95b6aac73c94bf7de615a9120a618929e64e3b4c9abda12251f5ced2ac9dd17fdca00e4a6f41e07ecf6136c25413df42754852a2d8ef8281
|
7
|
+
data.tar.gz: 728578542e95dd85fe9c4f9837fb698c1409c5a8877fc90dfd730587d39c798b90e0319cd3d1cd6ced16b5456a2fb0d6300781b50c36faf2888eeb3170bdf526
|
data/README.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# lita-github-pinger
|
2
2
|
|
3
|
-
|
3
|
+
This is a Lita handler for pinging you about github events that you should know about.
|
4
|
+
|
5
|
+
In particular, it will ping you under four circumstances (right now):
|
6
|
+
|
7
|
+
1. Somebody has commented on your pull request
|
8
|
+
2. Somebody has @mentioned you through a comment on a pull request
|
9
|
+
3. Somebody has assigned you to a pull request
|
10
|
+
4. The status of your pull request was set to "failing"
|
4
11
|
|
5
12
|
## Installation
|
6
13
|
|
@@ -12,8 +19,37 @@ gem "lita-github-pinger"
|
|
12
19
|
|
13
20
|
## Configuration
|
14
21
|
|
15
|
-
|
22
|
+
For any repos which you would like to watch, add a GitHub webhook that will post to http://yourlitaapp.herokuapp.com/ghping and check off the following events:
|
23
|
+
|
24
|
+
- Issue comment
|
25
|
+
- Pull Request review comment
|
26
|
+
- Pull Request
|
27
|
+
- Status
|
28
|
+
|
29
|
+
|
30
|
+
You will also need to have a config variable named `config.handlers.github_pinger.engineers` set to the following:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
config.handlers.github_pinger.engineers = {
|
34
|
+
"Your Name" => {
|
35
|
+
usernames: {
|
36
|
+
slack: "yourname", # I know, not everybody uses slack - this will still work.
|
37
|
+
github: "awesome"
|
38
|
+
},
|
39
|
+
github_preferences: {
|
40
|
+
frequency: "all_discussion",
|
41
|
+
location: "dm"
|
42
|
+
},
|
43
|
+
travis_preferences: { # I know, not everybody uses travis - this will still work.
|
44
|
+
frequency: "only_failures"
|
45
|
+
}
|
46
|
+
},
|
47
|
+
"Another Name" => {
|
48
|
+
# ...
|
49
|
+
}
|
50
|
+
}
|
51
|
+
```
|
16
52
|
|
17
53
|
## Usage
|
18
54
|
|
19
|
-
|
55
|
+
There is no interface, Lita does all the talking here.
|
@@ -139,7 +139,7 @@ module Lita
|
|
139
139
|
puts "Found @mentions in the body of the comment! Extracting usernames... "
|
140
140
|
|
141
141
|
# get each @mentioned engineer in the comment
|
142
|
-
mentions = comment.split("@")[1..-1].map { |snip| snip.split(" ").first }
|
142
|
+
mentions = comment.split("@")[1..-1].map { |snip| snip.split(" ").first.gsub(/[^0-9a-z ]/i }
|
143
143
|
|
144
144
|
puts "Done. Got #{mentions}"
|
145
145
|
puts "Converting usernames to engineers..."
|
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.6.
|
3
|
+
spec.version = "0.6.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."
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
+
# This file is out of date and will be fixed soon
|
4
|
+
|
3
5
|
describe Lita::Handlers::GithubPinger, lita_handler: true do
|
4
6
|
before do
|
5
7
|
registry.config.handlers.github_pinger.engineers = [
|
@@ -7,38 +9,6 @@ describe Lita::Handlers::GithubPinger, lita_handler: true do
|
|
7
9
|
slack: "taylor",
|
8
10
|
github: "taylorlapeyre"
|
9
11
|
},
|
10
|
-
{
|
11
|
-
slack: "petergao",
|
12
|
-
github: "peteygao"
|
13
|
-
},
|
14
|
-
{
|
15
|
-
slack: "matt",
|
16
|
-
github: "mtthgn"
|
17
|
-
},
|
18
|
-
{
|
19
|
-
slack: "bigsean",
|
20
|
-
github: "telaviv"
|
21
|
-
},
|
22
|
-
{
|
23
|
-
slack: "urich",
|
24
|
-
github: "maalur"
|
25
|
-
},
|
26
|
-
{
|
27
|
-
slack: "evan",
|
28
|
-
github: "evantarrh"
|
29
|
-
},
|
30
|
-
{
|
31
|
-
slack: "bsturd",
|
32
|
-
github: "bsturdivan"
|
33
|
-
},
|
34
|
-
{
|
35
|
-
slack: "jeff",
|
36
|
-
github: "jeffmicklos"
|
37
|
-
},
|
38
|
-
{
|
39
|
-
slack: "nan",
|
40
|
-
github: "thenanyu"
|
41
|
-
}
|
42
12
|
]
|
43
13
|
end
|
44
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-github-pinger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Lapeyre
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|