git_ownership_insights 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/git_ownership_insights +18 -13
- data/lib/git_ownership_insights/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b7a7be3eb274378081cac3ffa1c7698dcc17dc1ea5e8dd61b3bfbdedfdee55c
|
4
|
+
data.tar.gz: 68011fb06d78d3eee4d47e3dcf3bf68e79c759d03acbfee3edaa525d8627d8bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2782093b040f0947b82f0ad29633628afda6ac83824e1532ba8157f569efc7199f11c29b8055ec11073b1436efcb890a5ccff44450aadf1ae17c5c3fcb48d1cc
|
7
|
+
data.tar.gz: 1e7017a0f1cb0bfe93ff9c6a1193de0fd78f59bf4d17fd0834c4a2390af8dd7fab16680aafd0bc5ffb04b175454c395a2cbea2d79f30f758f04e105335d0aabe
|
data/Gemfile.lock
CHANGED
data/bin/git_ownership_insights
CHANGED
@@ -247,15 +247,6 @@ def contribution_message(directory_path:, duration_in_days:, begin_time:, debug:
|
|
247
247
|
churn_count = file_team_map.values.map { |value| value[1] }.sum
|
248
248
|
hotspot_changes_percentage = (churn_count.to_f / total_changes.to_f)*100
|
249
249
|
|
250
|
-
puts "Timeframe: #{(begin_time - duration_in_days).strftime('%Y-%m-%d')} to #{begin_time.strftime('%Y-%m-%d')}"
|
251
|
-
puts " Code files with a single contributor: #{(100 - ((files_changed_by_many_teams.to_f / code_files_with_changes.count.to_f) * 100)).round(2)}%"
|
252
|
-
puts " Hotspot code changes: #{churn_count} (#{hotspot_changes_percentage.round(2)}%)"
|
253
|
-
puts " Total occurrences of cross-squad dependencies over same files: #{teams_count}"
|
254
|
-
puts " Amount of code changes: #{total_changes}"
|
255
|
-
puts " Total files changed: #{code_files_with_changes.count}"
|
256
|
-
puts " Total files in the folder: #{file_count}"
|
257
|
-
puts " Contributors: #{contributors}"
|
258
|
-
|
259
250
|
# Filter files based on extension and size
|
260
251
|
filtered_files = file_team_map.select do |file_path|
|
261
252
|
next unless File.exist?(file_path)
|
@@ -265,17 +256,31 @@ def contribution_message(directory_path:, duration_in_days:, begin_time:, debug:
|
|
265
256
|
end
|
266
257
|
|
267
258
|
filtered_top_touched_files = filtered_files.sort_by { |element, count| [-count.last, element] }
|
268
|
-
|
259
|
+
|
260
|
+
puts "Timeframe: #{(begin_time - duration_in_days).strftime('%Y-%m-%d')} to #{begin_time.strftime('%Y-%m-%d')}"
|
261
|
+
puts " Hotspot Code Changes: #{churn_count} (#{hotspot_changes_percentage.round(2)}%)"
|
262
|
+
puts " Cross-Squad File Dependencies Count: #{teams_count}"
|
263
|
+
puts " Files exceeding #{BIG_FILE_SIZE} lines with multiple contributors: #{filtered_top_touched_files.count}"
|
269
264
|
count_hotspot_lines(filtered_files.keys)
|
270
|
-
|
265
|
+
count_big_files(directory_path)
|
266
|
+
puts " Code files with a single contributor: #{(100 - ((files_changed_by_many_teams.to_f / code_files_with_changes.count.to_f) * 100)).round(2)}%"
|
267
|
+
puts " Total amount of code changes: #{total_changes}"
|
268
|
+
puts " Total files changed: #{code_files_with_changes.count}"
|
269
|
+
puts " Total files in the folder: #{file_count}"
|
270
|
+
puts " Contributors: #{contributors}"
|
271
|
+
|
271
272
|
if HOTSPOT
|
273
|
+
puts "\n"
|
274
|
+
puts " Hotspot changes:"
|
272
275
|
filtered_top_touched_files.each do |line|
|
273
|
-
puts "
|
276
|
+
puts " #{line.first.gsub(directory_path, '')} Contributors: #{line.last.first} Commits: #{line.last.last}"
|
274
277
|
end
|
275
278
|
end
|
276
|
-
|
279
|
+
|
277
280
|
|
278
281
|
if CODEOWNERS
|
282
|
+
puts "\n"
|
283
|
+
puts "Code ownership data:"
|
279
284
|
codeowners = read_codeowners_file
|
280
285
|
|
281
286
|
owners_data = Hash.new do |hash, key|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_ownership_insights
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
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-01-
|
11
|
+
date: 2024-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: date
|