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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc9c0c038149e42cd56b515168124dd68d50476169deedd38e98cb8593770106
4
- data.tar.gz: bc3e24fb12aac9bf7e94e6649b61b4941d1dfba20a7cc23f4ba56e566631faa1
3
+ metadata.gz: 6b7a7be3eb274378081cac3ffa1c7698dcc17dc1ea5e8dd61b3bfbdedfdee55c
4
+ data.tar.gz: 68011fb06d78d3eee4d47e3dcf3bf68e79c759d03acbfee3edaa525d8627d8bc
5
5
  SHA512:
6
- metadata.gz: 7638cb2568573d64238ba56438b9bb70e7a7ec6c9d28ac353e79c867d174039c04237103fc424cadd146d169bbce2014a8651445cc660ae2b7a06a7126bdb7cd
7
- data.tar.gz: 5941142ba797b288b7a82e5a5b20edf91eb2c00cf754375743eccbb70e0ad31b8ce111f03f1c238746724d096f686b3f0b786c75432d3571e9b290eea7ae1284
6
+ metadata.gz: 2782093b040f0947b82f0ad29633628afda6ac83824e1532ba8157f569efc7199f11c29b8055ec11073b1436efcb890a5ccff44450aadf1ae17c5c3fcb48d1cc
7
+ data.tar.gz: 1e7017a0f1cb0bfe93ff9c6a1193de0fd78f59bf4d17fd0834c4a2390af8dd7fab16680aafd0bc5ffb04b175454c395a2cbea2d79f30f758f04e105335d0aabe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_ownership_insights (1.0.4)
4
+ git_ownership_insights (1.0.6)
5
5
  date
6
6
  pry
7
7
 
@@ -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
- count_big_files(directory_path)
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
- puts " Total files longer than #{BIG_FILE_SIZE} lines with multiple contributors: #{filtered_top_touched_files.count}\n"
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 " #{line.first.gsub(directory_path, '')} Contributors: #{line.last.first} Commits: #{line.last.last}"
276
+ puts " #{line.first.gsub(directory_path, '')} Contributors: #{line.last.first} Commits: #{line.last.last}"
274
277
  end
275
278
  end
276
- puts "\n\n"
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitOwnershipInsights
4
- VERSION = '1.0.5'
4
+ VERSION = '1.0.6'
5
5
  end
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.5
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-23 00:00:00.000000000 Z
11
+ date: 2024-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: date