git_ownership_insights 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e95410a234ad6fdf3d9684a28da2dcd3515cb77c3f949fa0c2e97723cb6e76f
4
- data.tar.gz: e212afe069ae204cd8f2eb8b07a49774dd64de590945940da812e6c4048ab111
3
+ metadata.gz: b2f6a04d3018e987e2762a5037c474904cf6602fded2e27f08df2789f0dc99c3
4
+ data.tar.gz: 8ae4f2dc116cf482b4ff0f7a10225e1d6aeefa4a1f7219a7909eca541a4a51f1
5
5
  SHA512:
6
- metadata.gz: 3b9ea8b6441df0167ff471a2118a293c5e250dbecc817a330985a29ab950d12b59d8de1c24cb2b2b275fbfc842500174deeb906d792e6d51338adc905c62d919
7
- data.tar.gz: d08540070983653aa3216aab3a3e7b01d46e36e35666cc7ca0e7d4307e7d7995742628b781704397a8dcfa633cfce82cd8d34d2f78f33eb13bed559aaa7d810a
6
+ metadata.gz: ef5dc57fa25ac45c1732177686c947bd30f373fce422a1208993da14e52a104f15ceab0902005c48b789428c2fcd6edac2e851303457ab21aaa7664ffde0a853
7
+ data.tar.gz: 0ee6b4f127938b0d4daa4e3f6b1e35491e79698af297bec7f96321313180fd4a2cf2a553727c5da3559879bbc152e2be175deac9ada09ebd210ce9d4c03a1b65
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_ownership_insights (2.0.6)
4
+ git_ownership_insights (2.0.7)
5
5
  date
6
6
  pry
7
7
 
@@ -54,16 +54,6 @@ OptionParser.new do |opts|
54
54
  options[:team_regex] = team_regex
55
55
  end
56
56
 
57
- opts.on('--top-contributing-team STRING',
58
- 'Limit of top contributed to the directory teams in codeownership data [default: 5]') do |top_contributing_team|
59
- options[:top_contributing_team] = top_contributing_team
60
- end
61
-
62
- opts.on('--top-touched-files STRING',
63
- 'Limit of top touched files by individual contributors in codeownership data [default: 5]') do |top_touched_files|
64
- options[:top_touched_files] = top_touched_files
65
- end
66
-
67
57
  opts.on('--codeowners-path STRING', 'Path to CODEOWNERS file [default: .github/CODEOWNERS]') do |codeowners_path|
68
58
  options[:codeowners_path] = codeowners_path
69
59
  end
@@ -107,8 +97,6 @@ end.parse!
107
97
  EXCLUSIONS = options[:exclusions]&.split(',')
108
98
  REPO_PATH = options[:path] || '.'
109
99
  TEAM_REGEX = options[:team_regex] || '[A-Za-z]+'
110
- TOP_TOUCHED_FILES = options[:top_touched_files] || 5
111
- TOP_CONTRIBUTED_TEAMS = options[:top_contributing_team] || 5
112
100
  CODEOWNERS_PATH = options[:codeowners_path] || '.github/CODEOWNERS'
113
101
  BIG_FILE_SIZE = options[:big_file_size] || 250
114
102
  CI = options[:ci] || false
@@ -131,8 +119,6 @@ unless CI
131
119
  puts "Lines of code limit (big files) for the hotspot calculation: #{BIG_FILE_SIZE}"
132
120
  puts "Hotspot detailed output is: #{options[:hotspot_files] ? 'on' : 'off'}\n"
133
121
  puts "CODEOWNERS output is: #{options[:codeowners] ? 'on' : 'off'}\n"
134
- puts "Limit of the teams shown in codeownership data: #{TOP_CONTRIBUTED_TEAMS}"
135
- puts "Limit of the files shown in codeownership data: #{TOP_TOUCHED_FILES}"
136
122
  puts "Output to file mode is: #{options[:file_output] ? 'on' : 'off'}\n"
137
123
  puts "CI mode is: #{options[:ci] ? 'on' : 'off'}\n"
138
124
  puts "Debug mode is: #{options[:debug] ? 'on' : 'off'}\n\n"
@@ -75,13 +75,9 @@ class GitOwnershipInsights
75
75
 
76
76
  # Sort owners_data by total count in descending order
77
77
  sorted_owners_data = owners_data.sort_by { |_, data| -data[:churn_count] }
78
-
79
- # Take the last 5 elements
80
- top_owners_data = sorted_owners_data.last(TOP_CONTRIBUTED_TEAMS.to_i)
81
-
82
78
  converted_team_map = file_team_map.transform_keys { |key| File.basename(key) }
83
79
 
84
- top_owners_data.each do |owner, data|
80
+ sorted_owners_data.each do |owner, data|
85
81
  output += "\n #{owner.split('/').last}:\n Total Count: #{data[:churn_count]}\n"
86
82
  data[:directories].each do |dir, dir_data|
87
83
  output += " Directory: #{dir}\n Top files:\n"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class GitOwnershipInsights
4
- VERSION = '2.0.6'
4
+ VERSION = '2.0.7'
5
5
  end
@@ -5,8 +5,6 @@ require_relative '../lib/git_ownership_insights/git_ownership_insight'
5
5
  RSpec.describe GitOwnershipInsights do
6
6
  EXCLUSIONS = %w[exclusion1 exclusion2].freeze
7
7
  TEAM_REGEX = '[A-Za-z]+'
8
- TOP_TOUCHED_FILES = 5
9
- TOP_CONTRIBUTED_TEAMS = 5
10
8
  CODEOWNERS_PATH = '.github/CODEOWNERS'
11
9
  BIG_FILE_SIZE = 250
12
10
  CI = false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_ownership_insights
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serghei Moret