hub_link 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hub_link/api/pull_request.rb +1 -1
- data/lib/hub_link/api/review_request.rb +16 -4
- data/lib/hub_link/version.rb +1 -1
- 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: d19f7bf5e1a7a9b210f5bdba1602b4a1347ebfae
|
4
|
+
data.tar.gz: 2812a6707c069e10209960bf692a88c0d8bae43c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ec6e0c6f7b9b0894aba97cc5f868d9652fc55e0b2d4513a810d78e7596a595e1f8180c7ecd83f1daa3263ff3752ffeac803404d0a513ad417da666c719fdf15
|
7
|
+
data.tar.gz: f8096c9fac8c9b9b8df2285d6cb5ed9ef0cd5ad659adea63577d170431154e44d99e3a64d72850d0aed12c043936141d97bf44e92d31e360e6389370ba0368a6
|
@@ -83,7 +83,7 @@ module HubLink
|
|
83
83
|
requests = Octokit.pull_request_review_requests(repo, number)
|
84
84
|
|
85
85
|
requests.users.compact.map do |reviewer|
|
86
|
-
ReviewRequest.new(
|
86
|
+
ReviewRequest.new(created_at: created_at, reviewer: reviewer.login, requester: submitter, pull_request_id: id)
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
@@ -1,19 +1,31 @@
|
|
1
1
|
module HubLink
|
2
2
|
module Api
|
3
3
|
class ReviewRequest
|
4
|
-
|
4
|
+
require "digest/sha1"
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
attr_reader :reviewer, :requester, :created_at, :pull_request_id
|
7
|
+
|
8
|
+
def initialize(reviewer:, requester:, created_at:, pull_request_id:)
|
8
9
|
@reviewer = reviewer
|
9
10
|
@requester = requester
|
10
11
|
@created_at = created_at
|
11
12
|
@pull_request_id = pull_request_id
|
12
13
|
end
|
13
14
|
|
15
|
+
# API doesn't return IDs for review requests https://developer.github.com/v3/pulls/review_requests/#list-review-requests
|
16
|
+
def digest
|
17
|
+
Digest::SHA1.hexdigest(digest_components.join)
|
18
|
+
end
|
19
|
+
|
14
20
|
def to_h
|
15
|
-
Slicer.new(self, columns: %i(
|
21
|
+
Slicer.new(self, columns: %i(digest reviewer requester created_at pull_request_id)).to_h
|
16
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def digest_components
|
27
|
+
[pull_request_id, reviewer]
|
28
|
+
end
|
17
29
|
end
|
18
30
|
end
|
19
31
|
end
|
data/lib/hub_link/version.rb
CHANGED
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.
|
4
|
+
version: 0.10.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-04-
|
11
|
+
date: 2019-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|