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

moosetechnology / GitProjectHealth / 16490676332

24 Jul 2025 07:32AM UTC coverage: 73.002% (-0.2%) from 73.181%
16490676332

Pull #219

github

web-flow
Merge b23203f76 into 55903cdcb
Pull Request #219: branch metrics

79 of 191 new or added lines in 8 files covered. (41.36%)

30 existing lines in 2 files now uncovered.

17798 of 24380 relevant lines covered (73.0%)

0.73 hits per line

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

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

7
{ #category : #calculating }
NEW
8
ActiveBranchesProjectMetric >> calculate [
×
NEW
9

×
NEW
10
        | groupedByDate |
×
NEW
11
        
×
NEW
12

×
NEW
13

×
NEW
14
        projectBranches ifNil:[ self load].
×
NEW
15
        
×
NEW
16
                
×
NEW
17
                
×
NEW
18
        
×
NEW
19
        groupedByDate := self setupGroupedDate.
×
NEW
20
        
×
NEW
21
        "convert group collect to set, to ensure no duplicated data"
×
NEW
22
        groupedByDate keys do: [ :key |  groupedByDate at: key put: Set new].
×
NEW
23
        
×
NEW
24

×
NEW
25
        projectBranches do: [ :branch |
×
NEW
26
                | dateOver commit|
×
NEW
27
                "sort commits by ASC date"
×
NEW
28
                commit := (branch commits sort: [ :c1 :c2 | c1 created_at > c2 created_at]) first.
×
NEW
29
                 
×
NEW
30
                dateOver := self transformDate: commit created_at to: over.
×
NEW
31
                groupedByDate at: dateOver printString ifPresent: [ :v | v add: commit created_at ] ].
×
NEW
32

×
NEW
33
        groupedByDate := groupedByDate collect: [ :group | group size ].
×
NEW
34

×
NEW
35
        ^ groupedByDate average asFloat
×
NEW
36
]
×
37

38
{ #category : #accessing }
39
ActiveBranchesProjectMetric >> description [
1✔
40

1✔
41
        ^ 'Nb active branches at period (avg)'
1✔
42
]
1✔
43

44
{ #category : #loading }
NEW
45
ActiveBranchesProjectMetric >> load [
×
NEW
46

×
NEW
47
        ^ projectBranches := self
×
NEW
48
                                  loadBranchesSince: (period at: #since)
×
NEW
49
                                  until: (period at: #until)
×
NEW
50
]
×
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

© 2026 Coveralls, Inc