• 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

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

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

×
NEW
10
        | groupedByDate outside|
×
NEW
11
        
×
NEW
12
        projectBranches ifNil:[ self load].
×
NEW
13
        
×
NEW
14
        groupedByDate := self setupGroupedDate.
×
NEW
15
        
×
NEW
16
        "convert group collect to set, to ensure no duplicated data"
×
NEW
17
        groupedByDate keys do: [ :key |  groupedByDate at: key put: Set new].
×
NEW
18
        
×
NEW
19
        outside := OrderedCollection new.
×
NEW
20

×
NEW
21
        projectBranches do: [ :branch |
×
NEW
22
                | dateOver commit|
×
NEW
23
                "sort commits by ASC date"
×
NEW
24
                commit := (branch commits sort: [ :c1 :c2 | c1 created_at > c2 created_at]) first.
×
NEW
25
                dateOver := self transformDate: commit created_at to: over.
×
NEW
26
                groupedByDate at: dateOver printString ifAbsent: [  outside add: branch ] ].
×
NEW
27

×
NEW
28
        
×
NEW
29
        ^ outside size asFloat
×
NEW
30
]
×
31

32
{ #category : #accessing }
33
InactiveBranchesProjectMetric >> description [
1✔
34
        "inactif = no activity observed inside the set period"
1✔
35

1✔
36
        ^ 'Nb inactive branches at period (avg)'
1✔
37
]
1✔
38

39
{ #category : #loading }
NEW
40
InactiveBranchesProjectMetric >> load [
×
NEW
41

×
NEW
42
        ^ projectBranches := self
×
NEW
43
                                  loadBranchesSince: (period at: #since)
×
NEW
44
                                  until: (period at: #until)
×
NEW
45
]
×
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