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

moosetechnology / GitProjectHealth / 13785049793

11 Mar 2025 09:50AM UTC coverage: 64.986% (+0.4%) from 64.549%
13785049793

Pull #141

github

web-flow
Merge 240f1b7d2 into d9b1c261e
Pull Request #141: add metrics and test for contributors in project

217 of 221 new or added lines in 2 files covered. (98.19%)

11036 of 16982 relevant lines covered (64.99%)

0.65 hits per line

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

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

7
{ #category : #calculating }
8
ContributorsProjectMetric >> calculate [
1✔
9

1✔
10
        | groupedByDate |
1✔
11
        projectCommits ifNil: [ self load ].
1✔
12

1✔
13
        groupedByDate := self setupGroupedDate.
1✔
14
        
1✔
15
        "convert group collect to set, to ensure no duplicated data"
1✔
16
        groupedByDate keys do: [ :key |  groupedByDate at: key put: Set new].
1✔
17
        
1✔
18

1✔
19
        projectCommits do: [ :commit |
1✔
20
                | dateOver |
1✔
21
                dateOver := self transformDate: commit created_at to: over.
1✔
22
                groupedByDate at: dateOver printString ifPresent: [ :v | v add: commit commitCreator ] ].
1✔
23

1✔
24
        groupedByDate := groupedByDate collect: [ :group | group size ].
1✔
25

1✔
26
        ^ groupedByDate average asFloat
1✔
27
]
1✔
28

29
{ #category : #accessing }
NEW
30
ContributorsProjectMetric >> description [
×
NEW
31

×
NEW
32
        ^ 'Nb Contributors (avg)'
×
NEW
33
]
×
34

35
{ #category : #loading }
36
ContributorsProjectMetric >> load [
1✔
37

1✔
38
        ^ projectCommits := self
1✔
39
                                  loadCommitsSince: (period at: #since)
1✔
40
                                  until: (period at: #until)
1✔
41
]
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

© 2026 Coveralls, Inc