hub_link 0.7.0 → 0.8.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: 3f037667483d4be19384393de02f573672c2f359
4
- data.tar.gz: 0c5b5aba743dda3dc1f39c89d4d2a2c6562310fa
3
+ metadata.gz: 3934f3f12357ce71c83df1e378a30fa2c50755bc
4
+ data.tar.gz: 6035e3a09484a9c65a38d2386d64ab1e5a634254
5
5
  SHA512:
6
- metadata.gz: 0b008d5f998e86b7a7881aac5fc34fdb813da908441f9c92c4961f03ca890463e39581db801a0141ff467271fe1e51bf8674f16b06e5c498fe5a8cf10aaaf8db
7
- data.tar.gz: 664b164a34ecc3cc17c2344f5f04557e58942fd20ceec89aad647e59892acfa122b3598941106c7fb25c31dc1c1a777b0476461a4a7e749bcb531240e63678e3
6
+ metadata.gz: e0efb79b8f3f9c7c2be9e1fec552b7c12c3284a9a2d50f0a814cfb7170912d4ab502a167247d5fc83567df21b5149cb124e9c616a4c25358b4865b17e3114cce
7
+ data.tar.gz: 661469eaec2c34ad03d42e023e4ed943353fb966d2a3e56bc31e20520e9c9789af34b507c4524f9d2f02a15219aadb94ddae722344e2fdd86defb90c1c76ae39
@@ -17,7 +17,7 @@ module HubLink
17
17
 
18
18
  def submitter
19
19
  user.login
20
- end
20
+ end
21
21
 
22
22
  def reviews
23
23
  @_reviews ||= fetch_reviews
@@ -82,8 +82,8 @@ module HubLink
82
82
  def fetch_review_requests
83
83
  requests = Octokit.pull_request_review_requests(repo, number)
84
84
 
85
- requests.users.compact.map do |user|
86
- ReviewRequest.new(id: id, created_at: created_at, user: user)
85
+ requests.users.compact.map do |reviewer|
86
+ ReviewRequest.new(id: id, created_at: created_at, reviewer: reviewer.login, requester: submitter)
87
87
  end
88
88
  end
89
89
 
@@ -1,20 +1,17 @@
1
1
  module HubLink
2
2
  module Api
3
3
  class ReviewRequest
4
- attr_reader :created_at, :user, :id
4
+ attr_reader :id, :reviewer, :requester, :created_at
5
5
 
6
- def initialize(id:, created_at:, user:)
6
+ def initialize(id:, reviewer:, requester:, created_at:)
7
7
  @id = id
8
+ @reviewer = reviewer
9
+ @requester = requester
8
10
  @created_at = created_at
9
- @user = user
10
- end
11
-
12
- def reviewer
13
- user.login
14
11
  end
15
12
 
16
13
  def to_h
17
- Slicer.new(self, columns: %i(id user created_at reviewer)).to_h
14
+ Slicer.new(self, columns: %i(id reviewer requester created_at)).to_h
18
15
  end
19
16
  end
20
17
  end
@@ -1,3 +1,3 @@
1
1
  module HubLink
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hub_link
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-17 00:00:00.000000000 Z
11
+ date: 2019-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -154,7 +154,6 @@ files:
154
154
  - bin/setup
155
155
  - hub_link.gemspec
156
156
  - lib/hub_link.rb
157
- - lib/hub_link/api/.review_request.rb
158
157
  - lib/hub_link/api/pull_request.rb
159
158
  - lib/hub_link/api/review.rb
160
159
  - lib/hub_link/api/review_request.rb
@@ -1,14 +0,0 @@
1
- module Mergometer
2
- class ReviewRequest
3
- attr_reader :created_at, :user
4
-
5
- def initialize(created_at:, user:)
6
- @created_at = created_at
7
- @user = user
8
- end
9
-
10
- def reviewer
11
- user.login
12
- end
13
- end
14
- end