github_repo_statistics 2.3.10 → 2.3.12
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/github_repo_statistics +5 -1
- data/lib/github_repo_statistics/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: aed29c0811014b2d94b683a8202e3eb8ae65d5c9cbc214ba4893fb382ee57518
|
4
|
+
data.tar.gz: c8c99f66bb6da70450a5790c3708c9bc9d9194c89854721c04624d2e12b854c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5df331cb305e3c001fee8bdf21cce123d776043e87e4073832969ea13549be03d9a06190927f706746f19114a886bb3a15379eb355086cbebce96a451d38a199
|
7
|
+
data.tar.gz: f6b088dda74132a8f9d8bc7467604f6a7769da6cd4e3d72f062066660f1e595092322579fad6dc38b70d05f5c2fa874a6f9fd0afb6573af7b82a28c59d96b72e
|
data/Gemfile.lock
CHANGED
data/bin/github_repo_statistics
CHANGED
@@ -156,11 +156,15 @@ end
|
|
156
156
|
if options[:hotspot_check]
|
157
157
|
feature_branch = `git rev-parse --abbrev-ref HEAD`.chomp
|
158
158
|
puts "Feature branch: #{feature_branch}"
|
159
|
-
changed_files = `git diff --name-only master
|
159
|
+
changed_files = `git diff --name-only master...origin/#{feature_branch} | grep #{REPO_PATH} | grep '\.swift'`.split
|
160
160
|
puts "Changed files: #{changed_files}"
|
161
|
+
return if changed_files.empty?
|
162
|
+
|
161
163
|
branch_hotspot_files = GithubRepoStatistics.new(duration_in_days: options[:duration_in_days] || 30, directory_path: REPO_PATH,
|
162
164
|
begin_time: DateTime.now, steps: options[:steps].to_i, debug: options[:debug]).hotspot_check(files: changed_files, branch: feature_branch)
|
163
165
|
puts "branch_hotspot_files = #{branch_hotspot_files}"
|
166
|
+
return if branch_hotspot_files.empty?
|
167
|
+
|
164
168
|
system("git checkout #{DEFAULT_BRANCH}", [:out] => File::NULL)
|
165
169
|
master_hotspot_files = GithubRepoStatistics.new(duration_in_days: options[:duration_in_days] || 30, directory_path: REPO_PATH,
|
166
170
|
begin_time: DateTime.now, steps: options[:steps].to_i, debug: options[:debug]).hotspot_check(files: branch_hotspot_files, branch: DEFAULT_BRANCH)
|