lita-github_pr_list 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08591fc654b35c58e1eeec85c08780c1555b4213
4
- data.tar.gz: d24449999cd35e5dd9e94bfbac34ba1ae8e8d365
3
+ metadata.gz: 82ae98f62511ef5f22c91304e9e0a02b2e5de8d2
4
+ data.tar.gz: 405eda6066042603a6f46f86d781896e42cc0728
5
5
  SHA512:
6
- metadata.gz: b2bff2dff90231ecaad0b5df7482f8d55aab8382106f92f972be6ea0c7ffc9c5fd94adf04f07b7625f844ff5e965804450451fd05e0b6b60a2d788acaaefde05
7
- data.tar.gz: b69d1ec04f2f7b639ecced99de97cb1b64587a1c504bde776476d6da0cfdc5ec98de276c72f5bf3376b530b1497edacad1739766af391a830fe692b4e12d8792
6
+ metadata.gz: 7610ddb6a833221372c80b30e86b682938e0b9d4f6e79c466e6719d8e6ead78cbecba6fc8c60f6a0e38729938e4c69d337f6ed98e8f1ed54525ff1301c230f67
7
+ data.tar.gz: 42a46cdf0ca94974edf4592e67c38837101de2b6a2094423a2099fadc55169e01ee0c492e910a574de43b15343723127310e2db80ce1b7ce2982b8d026d90c0f
@@ -35,7 +35,7 @@ module Lita
35
35
  def build_summary
36
36
  github_pull_requests.map do |pr_issue|
37
37
  status = repo_status("#{pr_issue.repository.full_name}", pr_issue)
38
- "#{pr_issue.repository.name} #{status} #{pr_issue.title} #{pr_issue.pull_request.html_url}"
38
+ "#{pr_issue.repository.name} #{status} #{pr_issue.title} #{pr_issue.pull_request.html_url} (#{pr_opener pr_issue})"
39
39
  end
40
40
  end
41
41
 
@@ -52,6 +52,10 @@ module Lita
52
52
  github_options = options || { direction: 'asc', sort: 'created' }
53
53
  github_client.issue_comments(repo_full_name, issue_number, github_options)
54
54
  end
55
+
56
+ def pr_opener(pr)
57
+ pr.user.nil? ? 'unknown' : pr.user.login
58
+ end
55
59
  end
56
60
  end
57
61
  end
@@ -1,5 +1,5 @@
1
1
  module Lita
2
2
  module GithubPrList
3
- VERSION = "0.2.2"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -51,10 +51,9 @@ describe Lita::Handlers::GithubPrList, lita_handler: true do
51
51
  expect_any_instance_of(Octokit::Client).to receive(:issue_comments).and_return(issue_comments_passed, issue_comments_failed, issue_comments_passed_design)
52
52
 
53
53
  send_command("pr list")
54
-
55
- expect(replies.last).to include("waffles (elephant)(art)(art)(art) Found a waffle https://github.com/octocat/Hello-World/pull/1347")
56
- expect(replies.last).to include("waffles (elephant)(elephant)(elephant)(art) Found a bug https://github.com/octocat/Hello-World/pull/1347")
57
- expect(replies.last).to include("waffles (poop)(elephant)(art) Found a waffle https://github.com/octocat/Hello-World/pull/1347")
54
+ expect(replies.last).to include("waffles (elephant)(art)(art)(art) Found a waffle https://github.com/octocat/Hello-World/pull/1347 (octocat)")
55
+ expect(replies.last).to include("waffles (elephant)(elephant)(elephant)(art) Found a bug https://github.com/octocat/Hello-World/pull/1347 (octocat)")
56
+ expect(replies.last).to include("waffles (poop)(elephant)(art) Found a waffle https://github.com/octocat/Hello-World/pull/1347 (octocat)")
58
57
  end
59
58
 
60
59
  it "displays the status of the PR (in review/fixed)" do
@@ -62,8 +61,8 @@ describe Lita::Handlers::GithubPrList, lita_handler: true do
62
61
  expect_any_instance_of(Octokit::Client).to receive(:issue_comments).and_return(issue_comments_in_review, issue_comments_fixed)
63
62
 
64
63
  send_command("pr list")
65
- expect(replies.last).to include("waffles (book)(elephant)(art) Found a bug https://github.com/octocat/Hello-World/pull/1347")
66
- expect(replies.last).to include("waffles (wave)(elephant)(art) Found a waffle https://github.com/octocat/Hello-World/pull/1347")
64
+ expect(replies.last).to include("waffles (book)(elephant)(art) Found a bug https://github.com/octocat/Hello-World/pull/1347 (octocat)")
65
+ expect(replies.last).to include("waffles (wave)(elephant)(art) Found a waffle https://github.com/octocat/Hello-World/pull/1347 (octocat)")
67
66
  end
68
67
 
69
68
  it "displays the status of the PR (new)" do
@@ -72,7 +71,7 @@ describe Lita::Handlers::GithubPrList, lita_handler: true do
72
71
 
73
72
  send_command("pr list")
74
73
 
75
- expect(replies.last).to include("waffles (new)(elephant)(art) Found a bug https://github.com/octocat/Hello-World/pull/1347")
74
+ expect(replies.last).to include("waffles (new)(elephant)(art) Found a bug https://github.com/octocat/Hello-World/pull/1347 (octocat)")
76
75
  end
77
76
 
78
77
  it "lists gitlab merge requests" do
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.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van den Beuken
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2016-05-09 00:00:00.000000000 Z
18
+ date: 2017-05-30 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: lita
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  version: '0'
231
231
  requirements: []
232
232
  rubyforge_project:
233
- rubygems_version: 2.6.3
233
+ rubygems_version: 2.5.1
234
234
  signing_key:
235
235
  specification_version: 4
236
236
  summary: List open pull requests for an organization.