github_repo_statistics 2.2.9 → 2.2.11
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/github_repo_statistics/force_merge_report.rb +10 -5
- data/lib/github_repo_statistics/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: 45284d03e5ffb00cb2ed37dc99c775c4cd5270aa82ab8b56e71280d095fdc6f0
|
|
4
|
+
data.tar.gz: 14b0536562640711fc5219302932b55eaeae6d5a0ce08caf6fe01f50d3ad86b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd4cc361ad9a4e47ace0970e27fc201cfd73e14f2fe54d1be2378331c8e9de80b757c657bab8099633cf0c43cf57f972850e645e68649f19379cd0f6b613ef22
|
|
7
|
+
data.tar.gz: 93ac3757ec59d6ce9b433424bbf498635a9c26fa6b89324dcfb1b7164d4395588ed5cc31073b5692ae1014c8e474b374e160699d44904c6366b4181ef7119178
|
data/Gemfile.lock
CHANGED
|
@@ -31,6 +31,9 @@ class ForceMergeReport
|
|
|
31
31
|
|
|
32
32
|
weeks = @duration_in_days / 7
|
|
33
33
|
|
|
34
|
+
require 'pry'
|
|
35
|
+
binding.pry
|
|
36
|
+
|
|
34
37
|
(weekly_pull_requests.keys.sort[-weeks..] || []).each do |month|
|
|
35
38
|
pull_requests_for_month = weekly_pull_requests[month]
|
|
36
39
|
# Iterate through pull requests for the current month
|
|
@@ -52,7 +55,7 @@ class ForceMergeReport
|
|
|
52
55
|
|
|
53
56
|
# Filter checks without meeting the required status checks
|
|
54
57
|
failed_checks = all_checks.reject { |check| check.conclusion == 'success' || check.state == 'success' }
|
|
55
|
-
|
|
58
|
+
|
|
56
59
|
failed_checks.select! do |check|
|
|
57
60
|
['UI Tests', 'Unit Tests'].include?(check.context) || ['Mergeable: Size check', 'SonarQube Code Analysis'].include?(check.name)
|
|
58
61
|
end
|
|
@@ -90,7 +93,7 @@ class ForceMergeReport
|
|
|
90
93
|
summary[:workflows].each do |workflow, count|
|
|
91
94
|
puts " - #{workflow}: #{count}"
|
|
92
95
|
end
|
|
93
|
-
|
|
96
|
+
|
|
94
97
|
if ENV['BQ_CREDENTIALS']
|
|
95
98
|
require "google/cloud/bigquery"
|
|
96
99
|
require "json"
|
|
@@ -106,6 +109,7 @@ class ForceMergeReport
|
|
|
106
109
|
sonarqube_check = summary[:workflows]['SonarQube Code Analysis']
|
|
107
110
|
ui_tests_check = summary[:workflows]['UI Tests']
|
|
108
111
|
unit_tests_check = summary[:workflows]['Unit Tests']
|
|
112
|
+
total_prs = summary[:total]
|
|
109
113
|
|
|
110
114
|
query = <<~SQL
|
|
111
115
|
MERGE INTO force_merges AS target
|
|
@@ -117,10 +121,11 @@ class ForceMergeReport
|
|
|
117
121
|
target.ui_tests_count = #{ui_tests_check},
|
|
118
122
|
target.unit_tests_count = #{unit_tests_check},
|
|
119
123
|
target.size_check_count = #{size_check},
|
|
120
|
-
target.sonarqube_count = #{sonarqube_check}
|
|
124
|
+
target.sonarqube_count = #{sonarqube_check},
|
|
125
|
+
target.total_prs = #{total_prs}
|
|
121
126
|
WHEN NOT MATCHED THEN
|
|
122
|
-
INSERT (calendar_week, force_merges_count, ui_tests_count, unit_tests_count, size_check_count, sonarqube_count)
|
|
123
|
-
VALUES ('#{week}', #{failed_count}, #{ui_tests_check}, #{unit_tests_check}, #{size_check}, #{sonarqube_check});
|
|
127
|
+
INSERT (calendar_week, force_merges_count, ui_tests_count, unit_tests_count, size_check_count, sonarqube_count, total_prs)
|
|
128
|
+
VALUES ('#{week}', #{failed_count}, #{ui_tests_check}, #{unit_tests_check}, #{size_check}, #{sonarqube_check}, #{total_prs});
|
|
124
129
|
SQL
|
|
125
130
|
|
|
126
131
|
dataset.query(query)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: github_repo_statistics
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.11
|
|
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-03-
|
|
11
|
+
date: 2024-03-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: date
|