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

moosetechnology / GitProjectHealth / 11667512120

04 Nov 2024 03:36PM UTC coverage: 59.207% (+0.2%) from 59.01%
11667512120

Pull #105

github

web-flow
Merge 0462ff346 into 3c4574e31
Pull Request #105: fix/add email user to the importer + tests

71 of 82 new or added lines in 3 files covered. (86.59%)

149 existing lines in 35 files now uncovered.

9582 of 16184 relevant lines covered (59.21%)

0.59 hits per line

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

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

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

1✔
10
        | groupedByDate dateOver |
1✔
11
        userMergeRequests ifNil: [ self load ].
1✔
12
        
1✔
13
        groupedByDate := self setupGroupedDate.
1✔
14
        userMergeRequests ifEmpty: [ ^ 0 ].
1✔
15

1✔
16

1✔
17
        userMergeRequests do: [ :userMergeRequest |
1✔
18
                dateOver := self transformDate: userMergeRequest created_at to: over.
1✔
19
                groupedByDate
1✔
20
                        at: dateOver printString
1✔
21
                        ifPresent: [ :value | value add: userMergeRequest ] ].
1✔
22

1✔
23
        groupedByDate := groupedByDate collect: [ :group |
1✔
24
                                 | average |
1✔
25
                                 average := (group collect: [ :mergeRequest |
1✔
26
                                                     mergeRequest commits sum: [ :commit |
1✔
27
                                                             commit additions ] ]) average ].
1✔
28

1✔
29
        ^ groupedByDate average asFloat
1✔
30
]
1✔
31

32
{ #category : #accessing }
UNCOV
33
CodeAdditionByTicketMetric >> description [
×
34

×
35
        ^ 'average code addition by merge request associated with a jira ticket'
×
36
]
×
37

38
{ #category : #loading }
39
CodeAdditionByTicketMetric >> load [
1✔
40

1✔
41
        userMergeRequests := self
1✔
42
                                     loadUserCompleteMergeRequestsWithJiraIssueSince:
1✔
43
                                     (period at: #since)
1✔
44
                                     until: (period at: #until)
1✔
45
]
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