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

moosetechnology / GitProjectHealth / 13807399403

12 Mar 2025 08:58AM UTC coverage: 66.731% (+0.2%) from 66.508%
13807399403

Pull #145

github

web-flow
Merge 41a250ee3 into 2c2d8c5e1
Pull Request #145: Code addition merge rerquest project metric

6833 of 8097 new or added lines in 90 files covered. (84.39%)

1 existing line in 1 file now uncovered.

11746 of 17602 relevant lines covered (66.73%)

0.67 hits per line

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

90.59
/src/GitLabHealth-Model-Analysis/ProjectMetric.class.st
1
Class {
2
        #name : #ProjectMetric,
3
        #superclass : #Metric,
4
        #instVars : [
5
                'project',
6
                'projectCommits',
7
                'projectMergeRequests'
8
        ],
9
        #category : #'GitLabHealth-Model-Analysis'
10
}
11

12
{ #category : #testing }
NEW
13
ProjectMetric class >> isAbstract [
×
NEW
14

×
NEW
15
        ^ self == ProjectMetric
×
NEW
16
]
×
17

18
{ #category : #loading }
19
ProjectMetric >> loadCommitsSince: since until: until [
1✔
20

1✔
21
        | cacheSymbol allCommits |
1✔
22
        glhImporter withCommitDiffs: false.
1✔
23

1✔
24
        cacheSymbol := self
1✔
25
                               cacheSymbolFor: GLHCommit
1✔
26
                               since: since
1✔
27
                               until: until.
1✔
28

1✔
29
        "download commits unless project cache is not empty"
1✔
30
        allCommits := project repository
1✔
31
                                      cacheAt: cacheSymbol
1✔
32
                                      ifAbsentPut: [
1✔
33
                                              | foundCommits |
1✔
34
                                              foundCommits := glhImporter
1✔
35
                                                                      importCommitsOfProject: project
1✔
36
                                                                      since: since
1✔
37
                                                                      until: until.
1✔
38
                                              foundCommits ].
1✔
39

1✔
40
        allCommits do: [ :commit | glhImporter importCreatorOfCommit: commit ].
1✔
41
        glhImporter chainsCommitsFrom: allCommits.
1✔
42
        glhImporter withCommitDiffs: true.
1✔
43

1✔
44
        ^ allCommits
1✔
45
]
1✔
46

47
{ #category : #loading }
48
ProjectMetric >> loadMergeRequestsSince: since until: until [
1✔
49

1✔
50
        | cacheSymbol allMergeRequests |
1✔
51
        glhImporter withCommitDiffs: false.
1✔
52

1✔
53
        cacheSymbol := self
1✔
54
                               cacheSymbolFor: GLHMergeRequest 
1✔
55
                               since: since
1✔
56
                               until: until.
1✔
57

1✔
58
        "download mergerequest unless project cache is not empty"
1✔
59
        allMergeRequests := project repository
1✔
60
                                    cacheAt: cacheSymbol
1✔
61
                                    ifAbsentPut: [
1✔
62
                                            | foundMergeRequests |
1✔
63
                                            foundMergeRequests := glhImporter
1✔
64
                                                                          importMergeRequests:
1✔
65
                                                                          project
1✔
66
                                                                          since: since
1✔
67
                                                                          until: until.
1✔
68
                                            foundMergeRequests ].
1✔
69

1✔
70
        glhImporter withCommitDiffs: true.
1✔
71

1✔
72
        ^ allMergeRequests
1✔
73
        
1✔
74

1✔
75
]
1✔
76

77
{ #category : #loading }
78
ProjectMetric >> loadProjectCompleteMergeRequestsSince: since until: until [
1✔
79

1✔
80
        | mergeRequests |
1✔
81
    mergeRequests := self loadProjectMergeRequestsSince:  since until: until.
1✔
82

1✔
83
        mergeRequests do: [ :mergeRequest |
1✔
84
                glhImporter importMergeResquestMerger: mergeRequest.
1✔
85
                glhImporter importMergeRequestCommits: mergeRequest ].
1✔
86

1✔
87
        ^ mergeRequests
1✔
88
]
1✔
89

90
{ #category : #'as yet unclassified' }
91
ProjectMetric >> loadProjectMergeRequestsSince: since until: until [
1✔
92

1✔
93
        | mergeRequests |
1✔
94
         mergeRequests := self loadMergeRequestsSince: since until: until.
1✔
95

1✔
96
        ^ mergeRequests select: [ :mergeRequest | mergeRequest project = project  ]
1✔
97
]
1✔
98

99
{ #category : #accessing }
NEW
100
ProjectMetric >> project [
×
NEW
101

×
NEW
102
        ^ project
×
NEW
103
]
×
104

105
{ #category : #accessing }
106
ProjectMetric >> project: anObject [
1✔
107

1✔
108
        project := anObject
1✔
109
]
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