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

moosetechnology / GitProjectHealth / 17304039679

28 Aug 2025 06:02PM UTC coverage: 73.291% (-0.03%) from 73.322%
17304039679

Pull #224

github

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

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

14 existing lines in 2 files now uncovered.

18550 of 25310 relevant lines covered (73.29%)

0.73 hits per line

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

95.6
/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 : #load }
22
ProjectMetric >> loadBranchesSince: since until: until [ 
1✔
23

1✔
24

1✔
25
        ^        glhImporter importBranchesOf: project.
1✔
26
        
1✔
27
]
1✔
28

29
{ #category : #loading }
30
ProjectMetric >> loadCommitsSince: since until: until [
1✔
31

1✔
32
        | cacheSymbol allCommits |
1✔
33
        glhImporter withCommitDiffs: false.
1✔
34

1✔
35
        cacheSymbol := self
1✔
36
                               cacheSymbolFor: GLHCommit
1✔
37
                               since: since
1✔
38
                               until: until.
1✔
39

1✔
40
        "download commits unless project cache is not empty"
1✔
41
        allCommits := project repository
1✔
42
                                      cacheAt: cacheSymbol
1✔
43
                                      ifAbsentPut: [
1✔
44
                                              | foundCommits |
1✔
45
                                              foundCommits := glhImporter
1✔
46
                                                                      importCommitsOfProject: project
1✔
47
                                                                      since: since
1✔
48
                                                                      until: until.
1✔
49
                                              foundCommits ].
1✔
50

1✔
51
        allCommits do: [ :commit | glhImporter importCreatorOfCommit: commit ].
1✔
52
        glhImporter chainsCommitsFrom: allCommits.
1✔
53
        glhImporter withCommitDiffs: true.
1✔
54

1✔
55
        ^ allCommits
1✔
56
]
1✔
57

58
{ #category : #loading }
59
ProjectMetric >> loadMergeRequestsSince: since until: until [
1✔
60

1✔
61
        | cacheSymbol allMergeRequests |
1✔
62
        glhImporter withCommitDiffs: false.
1✔
63

1✔
64
        cacheSymbol := self
1✔
65
                               cacheSymbolFor: GLHMergeRequest 
1✔
66
                               since: since
1✔
67
                               until: until.
1✔
68

1✔
69
        "download mergerequest unless project cache is not empty"
1✔
70
        allMergeRequests := project repository
1✔
71
                                    cacheAt: cacheSymbol
1✔
72
                                    ifAbsentPut: [
1✔
73
                                            | foundMergeRequests |
1✔
74
                                            foundMergeRequests := glhImporter
1✔
75
                                                                          importMergeRequests:
1✔
76
                                                                          project
1✔
77
                                                                          since: since
1✔
78
                                                                          until: until.
1✔
79
                                            foundMergeRequests ].
1✔
80

1✔
81
        glhImporter withCommitDiffs: true.
1✔
82

1✔
83
        ^ allMergeRequests
1✔
84
        
1✔
85

1✔
86
]
1✔
87

88
{ #category : #loading }
89
ProjectMetric >> loadProjectCompleteMergeRequestsSince: since until: until [
1✔
90

1✔
91
        | mergeRequests |
1✔
92
    mergeRequests := self loadProjectMergeRequestsSince:  since until: until.
1✔
93

1✔
94
        mergeRequests do: [ :mergeRequest |
1✔
95
                glhImporter importMergeResquestMerger: mergeRequest.
1✔
96
                glhImporter importMergeRequestCommits: mergeRequest ].
1✔
97

1✔
98
        ^ mergeRequests
1✔
99
]
1✔
100

101
{ #category : #loading }
102
ProjectMetric >> loadProjectMergeRequestsSince: since until: until [
1✔
103

1✔
104
        | mergeRequests |
1✔
105
         mergeRequests := self loadMergeRequestsSince: since until: until.
1✔
106

1✔
107
        ^ mergeRequests select: [ :mergeRequest | mergeRequest project = project  ]
1✔
108
]
1✔
109

110
{ #category : #accessing }
UNCOV
111
ProjectMetric >> project [
×
UNCOV
112

×
UNCOV
113
        ^ project
×
UNCOV
114
]
×
115

116
{ #category : #accessing }
117
ProjectMetric >> project: anObject [
1✔
118

1✔
119
        project := anObject
1✔
120
]
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