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

moosetechnology / GitProjectHealth / 17323047694

29 Aug 2025 11:52AM UTC coverage: 73.28% (-0.04%) from 73.322%
17323047694

Pull #224

github

web-flow
Merge a11da2fc2 into f10fd5d0c
Pull Request #224: Fix import branches with commit stats

69 of 73 new or added lines in 2 files covered. (94.52%)

10 existing lines in 1 file now uncovered.

18550 of 25314 relevant lines covered (73.28%)

0.73 hits per line

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

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

15
{ #category : #testing }
16
ProjectMetric class >> isAbstract [
1✔
17

1✔
18
        ^ self == ProjectMetric
1✔
19
]
1✔
20

21
{ #category : #loading }
NEW
22
ProjectMetric >> loadAllTags [
×
NEW
23

×
NEW
24
        ^ glhImporter importTagsForProject: project
×
NEW
25
]
×
26

27
{ #category : #load }
28
ProjectMetric >> loadBranchesSince: since until: until [ 
1✔
29

1✔
30

1✔
31
        ^        glhImporter importBranchesOf: project.
1✔
32
        
1✔
33
]
1✔
34

35
{ #category : #loading }
36
ProjectMetric >> loadCommitsSince: since until: until [
1✔
37

1✔
38
        | cacheSymbol allCommits |
1✔
39
        glhImporter withCommitDiffs: false.
1✔
40

1✔
41
        cacheSymbol := self
1✔
42
                               cacheSymbolFor: GLHCommit
1✔
43
                               since: since
1✔
44
                               until: until.
1✔
45

1✔
46
        "download commits unless project cache is not empty"
1✔
47
        allCommits := project repository
1✔
48
                                      cacheAt: cacheSymbol
1✔
49
                                      ifAbsentPut: [
1✔
50
                                              | foundCommits |
1✔
51
                                              foundCommits := glhImporter
1✔
52
                                                                      importCommitsOfProject: project
1✔
53
                                                                      since: since
1✔
54
                                                                      until: until.
1✔
55
                                              foundCommits ].
1✔
56

1✔
57
        allCommits do: [ :commit | glhImporter importCreatorOfCommit: commit ].
1✔
58
        glhImporter chainsCommitsFrom: allCommits.
1✔
59
        glhImporter withCommitDiffs: true.
1✔
60

1✔
61
        ^ allCommits
1✔
62
]
1✔
63

64
{ #category : #loading }
65
ProjectMetric >> loadMergeRequestsSince: since until: until [
1✔
66

1✔
67
        | cacheSymbol allMergeRequests |
1✔
68
        glhImporter withCommitDiffs: false.
1✔
69

1✔
70
        cacheSymbol := self
1✔
71
                               cacheSymbolFor: GLHMergeRequest 
1✔
72
                               since: since
1✔
73
                               until: until.
1✔
74

1✔
75
        "download mergerequest unless project cache is not empty"
1✔
76
        allMergeRequests := project repository
1✔
77
                                    cacheAt: cacheSymbol
1✔
78
                                    ifAbsentPut: [
1✔
79
                                            | foundMergeRequests |
1✔
80
                                            foundMergeRequests := glhImporter
1✔
81
                                                                          importMergeRequests:
1✔
82
                                                                          project
1✔
83
                                                                          since: since
1✔
84
                                                                          until: until.
1✔
85
                                            foundMergeRequests ].
1✔
86

1✔
87
        glhImporter withCommitDiffs: true.
1✔
88

1✔
89
        ^ allMergeRequests
1✔
90
        
1✔
91

1✔
92
]
1✔
93

94
{ #category : #loading }
95
ProjectMetric >> loadProjectCompleteMergeRequestsSince: since until: until [
1✔
96

1✔
97
        | mergeRequests |
1✔
98
    mergeRequests := self loadProjectMergeRequestsSince:  since until: until.
1✔
99

1✔
100
        mergeRequests do: [ :mergeRequest |
1✔
101
                glhImporter importMergeResquestMerger: mergeRequest.
1✔
102
                glhImporter importMergeRequestCommits: mergeRequest ].
1✔
103

1✔
104
        ^ mergeRequests
1✔
105
]
1✔
106

107
{ #category : #loading }
108
ProjectMetric >> loadProjectMergeRequestsSince: since until: until [
1✔
109

1✔
110
        | mergeRequests |
1✔
111
         mergeRequests := self loadMergeRequestsSince: since until: until.
1✔
112

1✔
113
        ^ mergeRequests select: [ :mergeRequest | mergeRequest project = project  ]
1✔
114
]
1✔
115

116
{ #category : #accessing }
117
ProjectMetric >> project [
×
118

×
119
        ^ project
×
120
]
×
121

122
{ #category : #accessing }
123
ProjectMetric >> project: anObject [
1✔
124

1✔
125
        project := anObject
1✔
126
]
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