github_repo_statistics 2.2.6 → 2.2.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: 959ee199b0ea42238f2694323f48877276f03828cb14ea10961f24ce7072c20f
4
- data.tar.gz: 75096534af0a22946e376f6b9f9ac4763e58480e6f04e49c50c3bd2adb484ad0
3
+ metadata.gz: 59634e40931b882f4ee361ce7169a527319207e692e4107557456789b7059c7d
4
+ data.tar.gz: 5e70e25d137e0eb869c83750f946231d3d6222e5f8bf3aac1e22898035935e1e
5
5
  SHA512:
6
- metadata.gz: f83c75ebd84a3cfbe794439e6574a55210417c50b576c5b8601c84854a3a597bf31f1077365bda35f9c103a4186a6ca61642cd4d3d43ddbacbe79e02e22ad899
7
- data.tar.gz: 895557370c5ad8559bbe069e3d67099c2e982a555a012bafce3992f7a06ec138d56080f55adb97aaace459e6f6c34e3aa41a3ee659f59d1d937a73b6733b7e6e
6
+ metadata.gz: 15904f86e2c96e74e1396c5470ad3ef1698800b110840cc3b8b2d0000914a09984225c92eb3297878b8e4a4ab608d4efa5e134b2f6357ae048606573131f5c17
7
+ data.tar.gz: e1cb2e8c6e491e0cc30b55abc67fb39a2ae0be11907b05efe7b92299699317c00db25116a56a2386cb7ab227e8cade36ac71f2e74c52d4b77d66ba597ea864d2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github_repo_statistics (2.1.0)
4
+ github_repo_statistics (2.2.6)
5
5
  date
6
6
  faraday-retry
7
7
  google-cloud-bigquery
@@ -20,7 +20,7 @@ class ForceMergeReport
20
20
  pull_requests = client.list_issues(@repo, state: 'closed', since: DateTime.now - @duration_in_days)
21
21
 
22
22
  # Sort PRs into monthly chunks
23
- weekly_pull_requests = pull_requests.group_by { |pr| pr.closed_at.strftime('%Y-%U') }
23
+ weekly_pull_requests = pull_requests.group_by { |pr| pr.closed_at.strftime('%Y-%W') }
24
24
 
25
25
  # Initialize a hash to store monthly summaries
26
26
  weekly_summaries = Hash.new { |hash, key| hash[key] = { total: 0, failed: 0, workflows: Hash.new(0) } }
@@ -49,6 +49,10 @@ class ForceMergeReport
49
49
  # Filter checks without meeting the required status checks
50
50
  failed_checks = all_checks.reject { |check| check.conclusion == 'success' || check.state == 'success' }
51
51
 
52
+ failed_checks.select! do |check|
53
+ ['Mergeable: Size check', 'SonarQube Code Analysis', 'UI Tests'].include?(check.name)
54
+ end
55
+
52
56
  # Update monthly summary
53
57
  weekly_summaries[month][:total] += 1
54
58
  weekly_summaries[month][:failed] += 1 unless failed_checks.empty?
@@ -28,7 +28,7 @@ class ReviewReport
28
28
  pull_requests = client.list_issues(@repo, state: 'closed', since: DateTime.now - @duration_in_days)
29
29
 
30
30
  # Group pull requests by week
31
- pull_requests_by_week = pull_requests.group_by { |pr| pr[:closed_at].strftime('%Y-%U') }
31
+ pull_requests_by_week = pull_requests.group_by { |pr| pr[:closed_at].strftime('%Y-%W') }
32
32
 
33
33
  weeks = @duration_in_days / 7
34
34
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class GithubRepoStatistics
4
- VERSION = '2.2.6'
4
+ VERSION = '2.2.7'
5
5
  end
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.6
4
+ version: 2.2.7
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-02-28 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: date