deploy_log 0.1.7 → 0.1.8a
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deploy_log/github/helper.rb +10 -0
- data/lib/deploy_log/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8efe330a5904b33493a0c20ea2b1eddf39c9fc8483ab6d7450a772f60b6a5f14
|
4
|
+
data.tar.gz: 16cc0a1aeaca9548b31d1a190d27f0010f276c600b6631b2b602ee09ff79049b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 733bba8d06fe7d725a50b66acfd2b7139e2aaf562079c1bcf6731013d11aa8565353c299b0162b5f735290b4bc3b754a52d00c6b11de8e23788b8ed8ca33c8b6
|
7
|
+
data.tar.gz: 55cf93d87df9255b0edf4f8142746671932e645e96efac3454fed64d040e5443827eb1f06ecdf8814e1b49dec2a616b92ddf7150490ef333be0fbc5efb7bc555
|
@@ -10,6 +10,8 @@ module DeployLog
|
|
10
10
|
def initialize(user_repo)
|
11
11
|
@client = ::Octokit::Client.new(login: ENV['GITHUB_USER'], password: ENV['GITHUB_TOKEN'])
|
12
12
|
@repo_location = user_repo
|
13
|
+
# cache last API response
|
14
|
+
@last_response = nil
|
13
15
|
end
|
14
16
|
|
15
17
|
def pulls_in_timeframe(date_start = nil, date_end = nil)
|
@@ -25,6 +27,7 @@ module DeployLog
|
|
25
27
|
File.open('/tmp/github-deploys.log', 'w+') do |f|
|
26
28
|
list.each do |pr|
|
27
29
|
next unless (date_start..date_end).cover? pr.merged_at
|
30
|
+
_c = committers_for(pr.number)
|
28
31
|
|
29
32
|
prs_covered += 1
|
30
33
|
|
@@ -89,9 +92,16 @@ module DeployLog
|
|
89
92
|
|
90
93
|
def user_who_merged(pr_number)
|
91
94
|
pr = @client.pull_request(@repo_location, pr_number)
|
95
|
+
@last_response = pr
|
96
|
+
|
92
97
|
pr.merged_by.login
|
93
98
|
end
|
94
99
|
|
100
|
+
def committers_for(num)
|
101
|
+
puts @last_response.inspect
|
102
|
+
# pr = @client.pull_request(@repo_location, num)
|
103
|
+
end
|
104
|
+
|
95
105
|
def formatted_time(time, correct_utc = false)
|
96
106
|
time = Time.now if time.nil?
|
97
107
|
time = time.localtime if correct_utc
|
data/lib/deploy_log/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deploy_log
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8a
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Priebe
|
@@ -118,9 +118,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - "
|
121
|
+
- - ">"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: 1.3.1
|
124
124
|
requirements: []
|
125
125
|
rubygems_version: 3.0.1
|
126
126
|
signing_key:
|