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

moosetechnology / GitProjectHealth / 12239702785

09 Dec 2024 04:15PM UTC coverage: 59.515% (+0.2%) from 59.333%
12239702785

Pull #113

github

web-flow
Merge 1ef25103a into 795d570a9
Pull Request #113: feat(UserJiraMetric): add metric CommitNumberLinkWithJiraTicket

82 of 88 new or added lines in 3 files covered. (93.18%)

9761 of 16401 relevant lines covered (59.51%)

0.6 hits per line

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

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

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

1✔
10
        | groupedByDate |
1✔
11
        userCommits ifNil: [ self load ].
1✔
12
        groupedByDate := self setupGroupedDate.
1✔
13

1✔
14
        userCommits do: [ :c |
1✔
15
                | dateOver |
1✔
16
                dateOver := self transformDate: c created_at to: over.
1✔
17
                groupedByDate at: dateOver printString ifPresent: [ :v | v add: c ] ].
1✔
18

1✔
19
        groupedByDate := groupedByDate collect: [ :group | group size ].
1✔
20

1✔
21
        ^ groupedByDate average asFloat
1✔
22
]
1✔
23

24
{ #category : #accessing }
NEW
25
CommitsLinkWithTicketMetric >> description [
×
NEW
26

×
NEW
27
        ^ 'number of commits link a jira ticket'
×
NEW
28
]
×
29

30
{ #category : #loading }
31
CommitsLinkWithTicketMetric >> load [
1✔
32

1✔
33
        | email |
1✔
34
        userCommits := self
1✔
35
                               loadUserCommitsSince: (period at: #since)
1✔
36
                               until: (period at: #until).
1✔
37
                
1✔
38
        email := self userEmail.
1✔
39

1✔
40
        jiraImporter importAllCurrentAndPastIssuesOf: email.
1✔
41

1✔
42
        GPJCConnector new
1✔
43
                gpModel: glhImporter glhModel;
1✔
44
                jiraModel: jiraImporter model;
1✔
45
                connect.
1✔
46

1✔
47
        ^userCommits := userCommits select: [ :commit |
1✔
48
                  commit jiraIssue isNotNil ]
1✔
49
                
1✔
50
        
1✔
51
]
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