lita-pullrequests 0.0.7 → 0.0.8
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/pullrequests.rb +6 -5
- data/lita-pullrequests.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: c7fb70d9a92880f7968a8abd3630f910c92b5d9b
|
|
4
|
+
data.tar.gz: 6aeb680bddfb78388f945b2f0a9a4225a5bf0386
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9ba3e4c7f7832e3e8fabe3cb80d0ff157404d1de47dea185f1441db80762bee4e3d59592f6f27f9d5665c7e01affbe927062ff38c8e7f6e982da91991a2b13d
|
|
7
|
+
data.tar.gz: 92b0e722c461b6b6ff6930b29ef24a31c6e54d0662b0074241ec0fc6c04851258d9390a190f0922c6cc7b7a1b21f30a2c16ef865ba74f525f123ccaf4552b2ff
|
|
@@ -58,16 +58,17 @@ module Lita
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def get_random_pr(chat)
|
|
61
|
-
|
|
61
|
+
pulls_by_repo = pulls_that_need_reviews.group_by { |pr| pr["url"].split("/")[-3] }
|
|
62
62
|
repo = chat.matches[0][0]
|
|
63
63
|
|
|
64
|
-
if
|
|
65
|
-
|
|
66
|
-
if
|
|
64
|
+
if config.repos.map { |r| r.split("/")[1] }.include?(repo)
|
|
65
|
+
pulls = pulls_by_repo[repo]
|
|
66
|
+
if pulls
|
|
67
|
+
pr = pulls.sample
|
|
67
68
|
title, user, url = pr["title"], pr["user"]["login"], pr["pull_request"]["html_url"]
|
|
68
69
|
chat.reply "_#{title}_ - #{user} \n #{url}"
|
|
69
70
|
else
|
|
70
|
-
chat.reply "No pull requests need
|
|
71
|
+
chat.reply "No pull requests need a review right now!"
|
|
71
72
|
end
|
|
72
73
|
else
|
|
73
74
|
chat.reply("I'm not configured for a repo with that name.")
|
data/lita-pullrequests.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = "lita-pullrequests"
|
|
3
|
-
spec.version = "0.0.
|
|
3
|
+
spec.version = "0.0.8"
|
|
4
4
|
spec.authors = ["Taylor Lapeyre"]
|
|
5
5
|
spec.email = ["taylorlapeyre@gmail.com"]
|
|
6
6
|
spec.description = %q{A Lita handler to help you keep track of your pull requests.}
|