lita-github_pr_list 0.0.15 → 0.0.16
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdf9713e32606d90c856f4cfa8e76dce822eaa6f
|
4
|
+
data.tar.gz: 08cb5fb6c22cb47f1e9d6df233d544088a5b14ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bdbac47ac8daeefa1e75e3c384369039346a0b0a90c7d1e6efe594aa4f29ff0f7d74422ff0c1ca4c0b530a4b3a09ceb7cb558f17c472a06df5d57c552d2cc06
|
7
|
+
data.tar.gz: 853e48b9c0d629a983acfc14d6b9afdcf8133f4e58a724451acc376a934e9d04ac03880fa2db3538d1f7bc9efe28097117dbfcc814f760189d849e69930d9c93
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 2014-11-04
|
2
|
+
|
3
|
+
Bug Fixes:
|
4
|
+
|
5
|
+
* Adding notification sent to Hipchat, opened status only. ([#32][], [@darkodosenovic][])
|
6
|
+
|
7
|
+
|
1
8
|
## 2014-10-09
|
2
9
|
|
3
10
|
Bug Fixes:
|
@@ -20,5 +27,7 @@ Features:
|
|
20
27
|
[#28]: https://github.com/amaabca/lita-github_pr_list/issues/28
|
21
28
|
[#29]: https://github.com/amaabca/lita-github_pr_list/issues/29
|
22
29
|
[#30]: https://github.com/amaabca/lita-github_pr_list/issues/30
|
30
|
+
[#32]: https://github.com/amaabca/lita-github_pr_list/issues/32
|
23
31
|
[@MathieuGilbert]: https://github.com/MathieuGilbert
|
32
|
+
[@darkodosenovic]: https://github.com/darkodosenovic
|
24
33
|
[@rubene]: https://github.com/rubene
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module Lita
|
2
2
|
module GithubPrList
|
3
3
|
class PullRequestOpenMessageHook
|
4
|
-
attr_accessor :response, :request, :redis, :payload, :pull_request_owner, :title, :repo_name
|
4
|
+
attr_accessor :response, :request, :redis, :payload, :pull_request_owner, :title, :repo_name, :pull_request_status, :pull_request_html_url, :statuses
|
5
5
|
|
6
6
|
def initialize(params = {})
|
7
|
+
self.statuses = %w(opened)
|
7
8
|
self.response = params.fetch(:response, nil)
|
8
9
|
self.request = params.fetch(:request, nil)
|
9
10
|
self.redis = params.fetch(:redis, nil)
|
@@ -12,13 +13,17 @@ module Lita
|
|
12
13
|
|
13
14
|
# https://developer.github.com/v3/activity/events/types/#pullrequestevent
|
14
15
|
self.payload = JSON.parse(request.body.read)
|
16
|
+
self.pull_request_status = payload["action"]
|
15
17
|
self.pull_request_owner = redis.get("alias:#{payload["pull_request"]["user"]["login"]}") || payload["pull_request"]["user"]["login"]
|
16
18
|
self.title = payload["pull_request"]["title"]
|
17
19
|
self.repo_name = payload["pull_request"]["head"]["repo"]["full_name"]
|
20
|
+
self.pull_request_html_url = payload["pull_request"]["html_url"]
|
18
21
|
end
|
19
22
|
|
20
23
|
def message
|
21
|
-
|
24
|
+
if statuses.include? pull_request_status
|
25
|
+
"@#{pull_request_owner} #{pull_request_status} pull request: '#{title}' in '#{repo_name}'. #{pull_request_html_url}'"
|
26
|
+
end
|
22
27
|
end
|
23
28
|
end
|
24
29
|
end
|
@@ -15,6 +15,6 @@ describe Lita::Handlers::GithubPrList, lita_handler: true do
|
|
15
15
|
github_handler = Lita::Handlers::GithubPrList.new
|
16
16
|
github_handler.pull_request_open_message_hook(request, response)
|
17
17
|
|
18
|
-
expect(replies.last).to include("@baxterthehacker opened pull request: 'Update the README with new information' in 'baxterthehacker/public-repo'")
|
18
|
+
expect(replies.last).to include("@baxterthehacker opened pull request: 'Update the README with new information' in 'baxterthehacker/public-repo'. https://github.com/baxterthehacker/public-repo/pull/48")
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-github_pr_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van den Beuken
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2014-11-
|
16
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: lita
|