cobench 0.0.35 → 0.0.37

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdd68553eb250f70a8b28b55881595a6ca920b35451a76e7eaaefe963e5c81f4
4
- data.tar.gz: bd69957900879988ccbc4194959d1ca27c55452a3f33f9a51bbcba4fe528e5da
3
+ metadata.gz: 1fe6bbe020470085a4d1b27652329050e512b24e7f70d695fe28ccd4a2632c19
4
+ data.tar.gz: e343aa56c2adc91781570522a4f406f2dfdf612547f810a6b6a41a82a1fb2583
5
5
  SHA512:
6
- metadata.gz: f617125d6f05b54e008170fd5fa53fc5623a16a861bd044ab0c31421a7e6054a601f8fc0cfa3a68dc10c3a01b35a0393942485d69729d34b7f570399981f835d
7
- data.tar.gz: 7579e8f69a4bb6d85d1b5a0aebce2223b4f95881f6a91122869f3b1b3a86b069a01be99725af4ffc960d56a9e416664ec856d0d6f3e38beec61aff579508af43
6
+ metadata.gz: 87a083edb57651abb5b3479d00158f5d69e9c8faef38d9400294e92089ec31eabff03dc7bca73a97b835f7629d4c1fc82f1da60393f7492d03735b9218bef802
7
+ data.tar.gz: ce7e4c932dece1733026572c25f27f124622d391df73b7d5c8d5bfac896fc4d3ebe45317f59b1e4560a7ef6d716c76e790ca86628b7c2c59be33a29e3d285c8d
@@ -7,5 +7,5 @@ jobs:
7
7
  pdd:
8
8
  runs-on: ubuntu-20.04
9
9
  steps:
10
- - uses: actions/checkout@v2
10
+ - uses: actions/checkout@v3
11
11
  - uses: g4s8/pdd-action@master
@@ -15,7 +15,7 @@ jobs:
15
15
  ruby: ['2.7', '3.0']
16
16
  runs-on: ${{ matrix.os }}
17
17
  steps:
18
- - uses: actions/checkout@v2
18
+ - uses: actions/checkout@v3
19
19
  - uses: ruby/setup-ruby@v1
20
20
  with:
21
21
  ruby-version: ${{ matrix.ruby }}
@@ -7,5 +7,5 @@ jobs:
7
7
  xcop:
8
8
  runs-on: ubuntu-20.04
9
9
  steps:
10
- - uses: actions/checkout@v2
10
+ - uses: actions/checkout@v3
11
11
  - uses: g4s8/xcop-action@master
data/bin/cobench CHANGED
@@ -169,6 +169,10 @@ def build_xml(opts, loog)
169
169
  data[u]['Score'] = { total: score }
170
170
  end
171
171
  averages = {
172
+ 'CpP': {
173
+ f: lambda { |ms| div(actual(ms['Commits']), actual(ms['Pulls'])) },
174
+ title: 'Commits per Pull Request'
175
+ },
172
176
  'HpP': {
173
177
  f: lambda { |ms| div(actual(ms['HoC']), actual(ms['Pulls'])) },
174
178
  title: 'HoC per Pull Request'
@@ -177,9 +181,9 @@ def build_xml(opts, loog)
177
181
  f: lambda { |ms| div(actual(ms['HoC']), actual(ms['Commits'])) },
178
182
  title: 'HoC per Commit'
179
183
  },
180
- 'MpP': {
181
- f: lambda { |ms| div(actual(ms['Msgs']), actual(ms['Pulls'])) },
182
- title: 'Messages per Pull Request'
184
+ 'MpRP': {
185
+ f: lambda { |ms| div(actual(ms['Msgs']), actual(ms['Reviews']) + actual(ms['Pulls'])) },
186
+ title: 'Messages per Review+Pulls'
183
187
  }
184
188
  }
185
189
  data.each do |u, ms|
@@ -37,13 +37,20 @@ class Cobench::Issues
37
37
  q = "in:comments type:issue author:#{@user} created:>#{from}"
38
38
  json = @api.search_issues(q)
39
39
  loog.debug("Found #{json.total_count} issues")
40
+ orgs = []
40
41
  total = json.items.count do |p|
41
42
  pr = p.url.split('/')[-1]
42
43
  repo = p.repository_url.split('/')[-2..-1].join('/')
43
44
  next unless Cobench::Match.new(@opts, loog).matches?(repo)
44
45
  loog.debug("Including #{repo}#{pr}")
46
+ orgs << p.repository_url.split('/')[-2]
45
47
  end
46
48
  [
49
+ {
50
+ meta: true,
51
+ title: 'Orgs',
52
+ list: orgs
53
+ },
47
54
  {
48
55
  title: 'Issues',
49
56
  total: total,
@@ -23,5 +23,5 @@
23
23
  # Copyright:: Copyright (c) 2022 Yegor Bugayenko
24
24
  # License:: MIT
25
25
  module Cobench
26
- VERSION = '0.0.35'.freeze
26
+ VERSION = '0.0.37'.freeze
27
27
  end
data/renovate.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:base"
5
+ ]
6
+ }
@@ -33,5 +33,7 @@ class TestReviews < Minitest::Test
33
33
  m = Cobench::Reviews.new(api, 'graur', { days: 2 })
34
34
  ms = m.take(Loog::VERBOSE)
35
35
  assert !ms.empty?
36
+ rescue Octokit::TooManyRequests
37
+ skip
36
38
  end
37
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cobench
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.35
4
+ version: 0.0.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-04 00:00:00.000000000 Z
11
+ date: 2022-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace
@@ -272,6 +272,7 @@ files:
272
272
  - lib/cobench/metrics/reviews.rb
273
273
  - lib/cobench/version.rb
274
274
  - logo.svg
275
+ - renovate.json
275
276
  - test/metrics/test_reviews.rb
276
277
  - test/test__helper.rb
277
278
  - test/test_mask.rb