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

moosetechnology / GitProjectHealth / 10919299699

18 Sep 2024 09:21AM UTC coverage: 20.045% (-0.06%) from 20.103%
10919299699

push

github

web-flow
fix: merge requests loading (#63)

0 of 89 new or added lines in 10 files covered. (0.0%)

1 existing line in 1 file now uncovered.

1961 of 9783 relevant lines covered (20.04%)

0.2 hits per line

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

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

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

×
10
        | groupedByDate gitAnalyzer contributions |
×
11
        userCommits ifNil: [ self load ].
×
12
        groupedByDate := self setupGroupedDate.
×
13

×
14
        gitAnalyzer := GitAnalyzer new.
×
15

×
16
        contributions := userCommits collect: [ :commit |
×
17
                                 commit -> (gitAnalyzer
×
18
                                          fromCommit: commit;
×
19
                                          analyseCommentContribution) ].
×
20

×
21

×
22
        contributions do: [ :assoc |
×
23
                | dateOver |
×
24
                dateOver := self transformDate: assoc key created_at to: over.
×
25
                groupedByDate
×
26
                        at: dateOver printString
×
27
                        ifPresent: [ :v | v add: assoc value ]
×
28
                        ifAbsentPut: [
×
29
                                OrderedCollection new
×
30
                                        add: assoc value;
×
31
                                        yourself ] ].
×
32

×
33
        groupedByDate := groupedByDate collect: [ :contribs |
×
34
                                 contribs
×
35
                                         ifNotEmpty: [ contribs sum ]
×
36
                                         ifEmpty: [ 0 ] ].
×
37

×
38

×
39
        ^ groupedByDate average asFloat
×
40
]
×
41

42
{ #category : #accessing }
43
CommentContributionMetric >> description [
×
44

×
45
        ^ 'comment contribution (avg)'
×
46
]
×
47

48
{ #category : #loading }
49
CommentContributionMetric >> load [
×
50

×
51
        userCommits := self
×
NEW
52
                               loadUserCompleteCommitsSince: (period at: #since)
×
53
                               until: (period at: #until)
×
54
]
×
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