github_repo_statistics 2.3.1 → 2.3.3

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: e27a6a13a4ce688ed3bda40c18cb6eb74ad11f4d0976009a681a21892fdadce5
4
- data.tar.gz: cbcc63cb44bbfbdd50e4c6f7d5b14efdc6672a0c303d6f0a4226fed64a83b98c
3
+ metadata.gz: bdc56e1b4161b43e58b1c055640a0642cb23d67543b862ade3c9c3b3bb063ca9
4
+ data.tar.gz: 217dd6a6bca243b9d5a9b2f128d2daabb89fefec6797594eeb053163feef6a17
5
5
  SHA512:
6
- metadata.gz: ac54df8ecee12b70d3680668e3aa112ae7b694c3f5da2f56a95a7d87399c8e0a91f9ac3cebf703e427839bf179c81ec005d3f811c25110912b0f8bcd7ee30f97
7
- data.tar.gz: 33fb0160c53b81602df8eff54904148b9932c6ff461b1cca5caca6a6dd53d1facc1fef036606eb68e8605550f4dd1be0f958cd85c08ab56f54dfd918e26cd358
6
+ metadata.gz: bc29053f5cdd3a17845c67eddac486e5ba8e1d106f490a5347438cc1d017641a90094bc2a2e7ba4a916b30737ce542fdbe19f706954afdd3e1f4a1d4e62945fd
7
+ data.tar.gz: f2aa93b43b2d25b4d244cc7248ee54ec617ce0dfffb7c05103fd468c8ade199c7390b31a126590ff57246c8ab3ffe444ef5f7c435c792fe4eae58a3804f656dc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github_repo_statistics (2.2.19)
4
+ github_repo_statistics (2.3.2)
5
5
  date
6
6
  faraday-retry
7
7
  google-cloud-bigquery
@@ -37,6 +37,11 @@ OptionParser.new do |opts|
37
37
  options[:excluded_files] = excluded_files
38
38
  end
39
39
 
40
+ opts.on('--excluded-commits STRING',
41
+ 'Comma-delimited list of excluded PRs [example: 1234,1235,2222]') do |excluded_prs|
42
+ options[:excluded_prs] = excluded_prs
43
+ end
44
+
40
45
  opts.on('--steps STRING', 'Number of steps the script will go into the past [default: 1]') do |steps|
41
46
  options[:steps] = steps
42
47
  end
@@ -106,6 +111,7 @@ HOTSPOT = options[:hotspot_files] || false
106
111
  FILE_OUTPUT = options[:file_output] || false
107
112
  CODE_EXTENSIONS = options[:code_extension] ? options[:code_extension].split(',') : ['.swift', '.kt']
108
113
  EXCLUDED_FILES = options[:excluded_files]
114
+ EXCLUDED_PRS = options[:excluded_prs]
109
115
 
110
116
  unless CI
111
117
  puts "\nDirectory: #{REPO_PATH}\n"
@@ -196,6 +196,11 @@ class GithubRepoStatistics
196
196
  filename = File.basename(file)
197
197
  commit_count = git_commit_count(file:, start_date:, end_date:).to_i
198
198
  git_log = git_commit_info(file:, start_date:, end_date:).split("\n")
199
+
200
+ if EXCLUDED_PRS
201
+ git_log = git_log.reject { |c| c.include?(EXCLUDED_PRS) }
202
+ end
203
+
199
204
  prs = git_log.map do |pr|
200
205
  match = pr.match(/#(\d+)/)
201
206
  if match
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class GithubRepoStatistics
4
- VERSION = '2.3.1'
4
+ VERSION = '2.3.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_repo_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serghei Moret
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-08 00:00:00.000000000 Z
11
+ date: 2024-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: date