git_ownership_insights 1.0.3 → 1.0.4
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 -3
- data/bin/git_ownership_insights +17 -16
- data/lib/git_ownership_insights/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eed900c5cbbf25ebae6d25b453a5d994518875986a5fd757d7554b546d9a7dbe
|
4
|
+
data.tar.gz: c63e8d5565b97f970bc80c0b311f131116a619fa93743270e08395d99a3d8cf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7229e4d3b818bd48dc85dd88aada8f259f7d2ea0bb4e96e0947700e367d9d3d87250e4cb5107c30fe71bc34543085e675c9f30028c87eb6d5b43b575ac0a4957
|
7
|
+
data.tar.gz: 2b061059f5ff9b61ec3ee80b71df8e54cb8b6ed157c5e49c175e6c72f3c2cac40b59ebc7d78fc1b9202b108eb546f188dee3ed61a71bef8a39953fa56c8573dd
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git_ownership_insights (0.
|
5
|
-
awesome_print
|
4
|
+
git_ownership_insights (1.0.4)
|
6
5
|
date
|
7
6
|
pry
|
8
7
|
|
@@ -10,7 +9,6 @@ GEM
|
|
10
9
|
remote: https://rubygems.org/
|
11
10
|
specs:
|
12
11
|
ast (2.4.2)
|
13
|
-
awesome_print (1.9.2)
|
14
12
|
coderay (1.1.3)
|
15
13
|
date (3.3.4)
|
16
14
|
diff-lcs (1.5.0)
|
data/bin/git_ownership_insights
CHANGED
@@ -10,11 +10,11 @@ options = {}
|
|
10
10
|
OptionParser.new do |opts|
|
11
11
|
opts.banner = 'Usage: git_ownership_insights [options]'
|
12
12
|
|
13
|
-
opts.on('
|
13
|
+
opts.on('--debug', 'Enable debug mode') do
|
14
14
|
options[:debug] = true
|
15
15
|
end
|
16
16
|
|
17
|
-
opts.on('
|
17
|
+
opts.on('--ci', 'Do not print the info messages for better CI text parsing [default: false]') do
|
18
18
|
options[:ci] = true
|
19
19
|
end
|
20
20
|
|
@@ -22,56 +22,56 @@ OptionParser.new do |opts|
|
|
22
22
|
options[:codeowners] = true
|
23
23
|
end
|
24
24
|
|
25
|
-
opts.on('
|
25
|
+
opts.on('--hotspot-files', 'Print the found hotspot files (big files touched by many) [default: false]') do
|
26
26
|
options[:hotspot_files] = true
|
27
27
|
end
|
28
28
|
|
29
|
-
opts.on('
|
29
|
+
opts.on('--excluded-contributors STRING', 'Comma-delimited list of excluded contributors [example: WEB,RAILS,MOBILE]') do |exclusions|
|
30
30
|
options[:exclusions] = exclusions
|
31
31
|
end
|
32
32
|
|
33
|
-
opts.on('
|
33
|
+
opts.on('--excluded-files STRING', 'Comma-delimited list of excluded files [example: ViewController,AppDelegate.swift]') do |excluded_files|
|
34
34
|
options[:excluded_files] = excluded_files
|
35
35
|
end
|
36
36
|
|
37
|
-
opts.on('
|
37
|
+
opts.on('--steps STRING', 'Number of steps the script will go into the past [default: 1]') do |steps|
|
38
38
|
options[:steps] = steps
|
39
39
|
end
|
40
40
|
|
41
|
-
opts.on('
|
41
|
+
opts.on('--duration-in-days STRING',
|
42
42
|
'Number of days to aggregate the changes for [default: 30]') do |duration_in_days|
|
43
43
|
options[:duration_in_days] = duration_in_days
|
44
44
|
end
|
45
45
|
|
46
|
-
opts.on('
|
46
|
+
opts.on('--path STRING', 'Path to the directory or file to calculate the ownership [default: "."]') do |path|
|
47
47
|
options[:path] = path
|
48
48
|
end
|
49
49
|
|
50
|
-
opts.on('
|
50
|
+
opts.on('--team-regex STRING', 'Regex that will identify the team name [default: "[A-Za-z]+"]') do |team_regex|
|
51
51
|
options[:team_regex] = team_regex
|
52
52
|
end
|
53
53
|
|
54
|
-
opts.on('
|
54
|
+
opts.on('--top-contributing-team STRING', 'Limit of top contributed to the directory teams in codeownership data [default: 5]') do |top_contributing_team|
|
55
55
|
options[:top_contributing_team] = top_contributing_team
|
56
56
|
end
|
57
57
|
|
58
|
-
opts.on('
|
58
|
+
opts.on('--top-touched-files STRING', 'Limit of top touched files by individual contributors in codeownership data [default: 5]') do |top_touched_files|
|
59
59
|
options[:top_touched_files] = top_touched_files
|
60
60
|
end
|
61
61
|
|
62
|
-
opts.on('
|
62
|
+
opts.on('--codeowners-path STRING', 'Path to CODEOWNERS file [default: .github/CODEOWNERS]') do |codeowners_path|
|
63
63
|
options[:codeowners_path] = codeowners_path
|
64
64
|
end
|
65
65
|
|
66
|
-
opts.on('
|
66
|
+
opts.on('--big-file-size STRING', 'The amount of lines in the file to be considered big [default: 250]') do |big_file_size|
|
67
67
|
options[:big_file_size] = big_file_size
|
68
68
|
end
|
69
69
|
|
70
|
-
opts.on('
|
70
|
+
opts.on('--default-branch STRING', 'The default branch to pull and run metrics for [default: master]') do |default_branch|
|
71
71
|
options[:default_branch] = default_branch
|
72
72
|
end
|
73
73
|
|
74
|
-
opts.on('
|
74
|
+
opts.on('--code-extensions STRING', 'The file extensions that consider to be code [default: ".kt, .swift"]') do |code_extension|
|
75
75
|
options[:code_extension] = code_extension
|
76
76
|
end
|
77
77
|
|
@@ -145,6 +145,7 @@ def find_owners(file_path, codeowners)
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def count_big_files(directory_path, size: BIG_FILE_SIZE)
|
148
|
+
size = size.to_i
|
148
149
|
# Get a list of all files in the specified directory
|
149
150
|
files = Dir.glob(File.join(directory_path, '**', '*')).select { |file| File.file?(file) }
|
150
151
|
|
@@ -313,7 +314,7 @@ unless CI
|
|
313
314
|
end
|
314
315
|
|
315
316
|
system("git checkout #{DEFAULT_BRANCH}", [ :out ] => File::NULL)
|
316
|
-
system("git pull", [ :out ] => File::NULL)
|
317
|
+
system("git pull", [ :out, :err ] => File::NULL)
|
317
318
|
|
318
319
|
contribution_message(duration_in_days: options[:duration_in_days] || 30, directory_path: REPO_PATH,
|
319
320
|
begin_time: DateTime.now, steps: options[:steps].to_i, debug: options[:debug])
|