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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b63fb3feb6a11482091194a4a8bb29ca93b1b99fd25cbf9ca5afb005f05611aa
4
- data.tar.gz: 846b88703fa21dd61832c7cc016d089382200b13d3b1d40c00af3a274e5b7de7
3
+ metadata.gz: 8efe330a5904b33493a0c20ea2b1eddf39c9fc8483ab6d7450a772f60b6a5f14
4
+ data.tar.gz: 16cc0a1aeaca9548b31d1a190d27f0010f276c600b6631b2b602ee09ff79049b
5
5
  SHA512:
6
- metadata.gz: f04c30540d05ba7a1c450706cd4ac1dcc4598c4fe500c6b8532ddf1055a08651e720901885a6ab1a03aab483396e4a4f6f48b3e06a86a44336982db1adda4e08
7
- data.tar.gz: 5e17bd315c2e139c7393d94909ee541408048ca3421f65bd767be71db6cad1c6b3aa5c2921432dc3b723e8bd7982eaeb55742203b347155cf726d0952ec4041f
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeployLog
4
- VERSION = '0.1.7'
4
+ VERSION = '0.1.8a'
5
5
  end
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.7
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: '0'
123
+ version: 1.3.1
124
124
  requirements: []
125
125
  rubygems_version: 3.0.1
126
126
  signing_key: