• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / GitProjectHealth / 13649940733

04 Mar 2025 09:00AM UTC coverage: 64.549% (+0.4%) from 64.16%
13649940733

push

github

web-flow
Merge pull request #138 from moosetechnology/AutoCodeCommitFrequencyProjectMetric

Auto Code Review commit frequency project metric

161 of 165 new or added lines in 2 files covered. (97.58%)

10819 of 16761 relevant lines covered (64.55%)

0.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.61
/src/GitLabHealth-Model-Analysis/AutoCodeCommitFrequencyProjectMetric.class.st
1
Class {
2
        #name : #AutoCodeCommitFrequencyProjectMetric,
3
        #superclass : #ProjectMetric,
4
        #category : #'GitLabHealth-Model-Analysis'
5
}
6

7
{ #category : #calculating }
8
AutoCodeCommitFrequencyProjectMetric >> calculate [  
1✔
9
    | groupedByDate |  
1✔
10
    projectCommits ifNil: [ self load ].  
1✔
11
    groupedByDate := self setupGroupedDate.  
1✔
12

1✔
13
    projectCommits do: [ :c |  
1✔
14
        (c title beginsWith: '[ACR]')  ifTrue: [  
1✔
15
            | dateOver |  
1✔
16
            dateOver := self transformDate: c created_at to: over.  
1✔
17
            groupedByDate at: dateOver printString ifPresent: [ :v | v add: c ]  
1✔
18
        ]  
1✔
19
    ].  
1✔
20

1✔
21
    groupedByDate := groupedByDate collect: [ :group | group size ].  
1✔
22
    ^ groupedByDate average asFloat.
1✔
23
]
1✔
24

25
{ #category : #accessing }
NEW
26
AutoCodeCommitFrequencyProjectMetric >> description [
×
NEW
27

×
NEW
28
        ^ 'Nb AutoCodeReview commit for accepted suggestion (avg)'
×
NEW
29
]
×
30

31
{ #category : #loading }
32
AutoCodeCommitFrequencyProjectMetric >> load [
1✔
33
        projectCommits := self loadCommitsSince: (period at: #since) until: (period at: #until) 
1✔
34
]
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc