github_repo_statistics 2.3.24 → 2.3.26
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f8c3548a534e695bf0efb8b5c98174e9870aca05d25478cddca5966f0175196
|
4
|
+
data.tar.gz: 84f0352e6758ff773abbe324d4ba44520e240ec088dab145acefb95f06a84912
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97136d14c94e4fb682a59d7c33bd0751762ee2056b45e530b34d72b5bfe841b68bf375f645f157f6006b105996e8beb7acb50b1ee39a6aa18f000544ce18b983
|
7
|
+
data.tar.gz: 63e254d07d1a7b0ca7ee6762a4980ea4b11819a09e4b3eaff37f652b28954e3b851c0fae573780aadc802ff08342a23503c66b36317a6445238870197f4f04e0
|
data/bin/github_repo_statistics
CHANGED
@@ -42,6 +42,10 @@ OptionParser.new do |opts|
|
|
42
42
|
options[:excluded_prs] = excluded_prs
|
43
43
|
end
|
44
44
|
|
45
|
+
opts.on('--excluded-contributor-names STRING', 'Comma-delimited list of excluded Contributros [example: Name1,Name2]') do |excluded_contributor_names|
|
46
|
+
options[:excluded_contributor_names] = excluded_contributor_names
|
47
|
+
end
|
48
|
+
|
45
49
|
opts.on('--steps STRING', 'Number of steps the script will go into the past [default: 1]') do |steps|
|
46
50
|
options[:steps] = steps
|
47
51
|
end
|
@@ -135,6 +139,7 @@ EXCLUDED_PRS = options[:excluded_prs]
|
|
135
139
|
TEAM_TO_FOCUS = options[:team_to_focus]
|
136
140
|
CODEOWNER_TO_FOCUS = options[:codeowner_to_focus]
|
137
141
|
PERCENTILE = options[:percentile] || '100'
|
142
|
+
EXCLUDED_CONTRIBUTOR_NAMES = options[:excluded_contributor_names]
|
138
143
|
|
139
144
|
unless CI
|
140
145
|
puts "\nDirectory: #{REPO_PATH}\n"
|
@@ -192,7 +192,7 @@ class GithubRepoStatistics
|
|
192
192
|
end
|
193
193
|
|
194
194
|
def git_commit_info(file:, start_date:, end_date:, branch: DEFAULT_BRANCH)
|
195
|
-
`git log origin/#{branch} --pretty=format:"%s" --since="#{start_date}" --until="#{end_date}" -- "#{file}"`
|
195
|
+
`git log origin/#{branch} --pretty=format:"%s : %an" --since="#{start_date}" --until="#{end_date}" -- "#{file}"`
|
196
196
|
end
|
197
197
|
|
198
198
|
def new_changes?(file:)
|
@@ -216,6 +216,12 @@ class GithubRepoStatistics
|
|
216
216
|
git_log = git_log.reject { |c| excluded_prs.any? { |pr| c.include?(pr) } }
|
217
217
|
end
|
218
218
|
|
219
|
+
if EXCLUDED_CONTRIBUTOR_NAMES
|
220
|
+
excluded_contributor_names = EXCLUDED_CONTRIBUTOR_NAMES.split(',')
|
221
|
+
git_log = git_log.reject { |c| excluded_contributor_names.any? { |cr| c.include?(cr) } }
|
222
|
+
end
|
223
|
+
|
224
|
+
|
219
225
|
prs = git_log.map do |pr|
|
220
226
|
match = pr.match(/#(\d+)/)
|
221
227
|
match[0] if match
|
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.
|
4
|
+
version: 2.3.26
|
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-07-
|
11
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: date
|