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

moosetechnology / GitProjectHealth / 10452237749

19 Aug 2024 11:10AM UTC coverage: 18.86% (-14.8%) from 33.667%
10452237749

Pull #31

github

web-flow
Merge 2cf167214 into 48c9c9c78
Pull Request #31: fix: error if there are no commits in averageTimeBetweenCommits method

163 of 1071 new or added lines in 15 files covered. (15.22%)

856 existing lines in 12 files now uncovered.

1585 of 8404 relevant lines covered (18.86%)

0.19 hits per line

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

0.0
/src/GitLabHealth-Model-Generator/GLHMetamodelGenerator.class.st
1
Class {
2
        #name : #GLHMetamodelGenerator,
3
        #superclass : #FamixMetamodelGenerator,
4
        #instVars : [
5
                'project',
6
                'group',
7
                'pipeline',
8
                'user',
9
                'repository',
10
                'branch',
11
                'file',
12
                'fileBlob',
13
                'fileDirectory',
14
                'commit',
15
                'commitStats',
16
                'diff',
17
                'job'
18
        ],
19
        #category : #'GitLabHealth-Model-Generator'
20
}
21

22
{ #category : #accessing }
23
GLHMetamodelGenerator class >> packageName [
×
24
        ^ #'GitLabHealth-Model'
×
25
]
×
26

27
{ #category : #accessing }
28
GLHMetamodelGenerator class >> prefix [
×
29
        ^ #GLH
×
30
]
×
31

32
{ #category : #accessing }
33
GLHMetamodelGenerator class >> submetamodels [
×
34

×
35
        ^ { FamixMooseQueryGenerator . FamixGenerator }
×
36
]
×
37

38
{ #category : #definition }
39
GLHMetamodelGenerator >> branchProperties [
×
40

×
41
        branch property: #name type: #String
×
42
]
×
43

44
{ #category : #definition }
45
GLHMetamodelGenerator >> commitProperties [
×
46

×
47
        commit property: #parent_ids type: #Object defaultValue: 'OrderedCollection new'.
×
48

×
49
        commit property: #id type: #String.
×
50
        commit property: #short_id type: #String.
×
51
        commit property: #title type: #String.
×
52
        commit property: #author_name type: #String.
×
53
        commit property: #author_email type: #String.
×
54
        commit property: #authored_date type: #Object.
×
55
        commit property: #committer_name type: #String.
×
56
        commit property: #committer_email type: #String.
×
57
        commit property: #committed_date type: #Object.
×
58
        commit property: #created_at type: #Object.
×
59
        commit property: #message type: #String.
×
60
        commit property: #web_url type: #String.
×
61

×
62

×
63
        (commit property: #additions type: #Number) comment:
×
64
                'The number of line that git consider added'.
×
65
        (commit property: #deletions type: #Number) comment:
×
66
                'The number of line that git consider deleted'
×
67
]
×
68

69
{ #category : #definition }
70
GLHMetamodelGenerator >> defineClasses [
×
71

×
72
        super defineClasses.
×
73
        group := builder newClassNamed: #Group comment: 'A GitLab Group'.
×
74
        group withGroup.
×
75
        project := builder
×
76
                           newClassNamed: #Project
×
77
                           comment: 'A GitLab Project'.
×
78
        pipeline := builder
×
79
                            newClassNamed: #Pipeline
×
80
                            comment: 'A GitLab Pipeline execution'.
×
81
        user := builder newClassNamed: #User comment: 'A GitLab User'.
×
82
        repository := builder
×
83
                              newClassNamed: #Repository
×
84
                              comment: 'A git repository'.
×
85
        branch := builder newClassNamed: #Branch comment: 'A git branch'.
×
86
        file := builder newClassNamed: #File comment: 'A file'.
×
87
        fileBlob := builder newClassNamed: #FileBlob comment: 'A file blob'.
×
88
        fileDirectory := builder
×
89
                                 newClassNamed: #FileDirectory
×
90
                                 comment: 'A file directory'.
×
91
        commit := builder
×
92
                          newClassNamed: #Commit
×
93
                          comment: 'a commit attached to a repository'.
×
94
        diff := builder newClassNamed: #Diff comment: 'The diff of a commit'.
×
95
        
×
96
        job := builder newClassNamed: #Job comment: 'A CI Job'
×
97
]
×
98

99
{ #category : #definition }
100
GLHMetamodelGenerator >> defineHierarchy [
×
101

×
102
        super defineHierarchy.
×
103
        (builder ensureClassNamed: #Entity) --|> #TEntityMetaLevelDependency.
×
104
        fileDirectory --|> file.
×
105
        fileBlob --|> file.
×
106

×
107
        group --|> #TNamedEntity.
×
108
        project --|> #TNamedEntity.
×
109
        user --|> #TNamedEntity.
×
110
        commit --|> #TNamedEntity.
×
111
        diff --|> #TNamedEntity.
×
112
        job --|> #TNamedEntity
×
113

×
114
]
×
115

116
{ #category : #definition }
117
GLHMetamodelGenerator >> defineProperties [
×
118

×
119
        super defineProperties.
×
120
        "Group properties"
×
121
        group property: #id type: #Number.
×
122
        group property: #web_url type: #String.
×
123
        group property: #description type: #String.
×
124
        group property: #visibility type: #String.
×
125
        group property: #avatar_url type: #String.
×
126

×
127
        "Project properties"
×
128
        project property: #id type: #Number.
×
129
        project property: #topics type: #Object.
×
130
        project property: #archived type: #Boolean.
×
131
        project property: #archived type: #Boolean.
×
132
        project property: #description type: #String.
×
133
        project property: #readme_url type: #String.
×
134
        project property: #avatar_url type: #String.
×
135
        project property: #web_url type: #String.
×
136
        project property: #creator_id type: #Number.
×
137

×
138
        "Pipelines properties"
×
139
        (pipeline property: #status type: #String) comment:
×
140
                '#success or #failure'.
×
141
        (pipeline property: #runDate type: #Object) comment:
×
142
                'Date this pipeline was run'.
×
143
        (pipeline property: #id type: #String) comment:
×
144
                'The id of the pipeline'.
×
145

×
146

×
147
        self userProperties.
×
148
        self branchProperties.
×
149
        self fileProperties.
×
150
        self commitProperties.
×
151
        self diffProperties.
×
152
        self jobProperties
×
153
]
×
154

155
{ #category : #definition }
156
GLHMetamodelGenerator >> defineRelations [
×
157

×
158
        super defineRelations.
×
159
        (group property: #projects) <>-* (project property: #group).
×
160
        (group property: #subGroups) <>-* (group property: #group).
×
161
        (project property: #pipelines) <>-* (pipeline property: #project).
×
162
        (project property: #creator) *- (user property: #createdProjects).
×
NEW
163
        (project property: #contributors) *-* (user property: #contributedProjects).
×
164
        (project property: #repository) <>- (repository property: #project).
×
165
        (repository property: #branches) <>-* (branch property: #repository).
×
166
        (branch property: #files) <>-* (file property: #branch).
×
167
        (fileDirectory property: #files)
×
168
        <>-* (file property: #directoryOwner).
×
169
        (repository property: #commits) <>-* (commit property: #repository).
×
170
        (branch property: #commits) <>-* (commit property: #branch).
×
NEW
171

×
172
        (commit property: #diffs) <>-* (diff property: #commit).
×
173
        (user property: #commits) <>-* (commit property: #commitCreator).
×
NEW
174
        (commit property: #parentCommits)
×
NEW
175
        *-* (commit property: #childCommits).
×
176
        (commit property: #jobs) <>-* (job property: #commit).
×
177
        (pipeline property: #jobs) <>-* (job property: #pipeline).
×
178
        (user property: #jobs) <>-* (job property: #user)
×
179
]
×
180

181
{ #category : #definition }
182
GLHMetamodelGenerator >> diffProperties [
×
183

×
184
        (diff property: #diffString type: #String) comment:
×
185
                'The string presenting the diff. It should follow the [Detailed-Unified](https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html) format'.
×
186
                
×
187
        (diff property: #new_path type: #String) comment:
×
188
                'The path to the file in the resulted repository commitish'.
×
189
                
×
190
        (diff property: #old_path type: #String) comment:
×
191
                'The path to the file in the origin repository commitish'.
×
192
                
×
193
        (diff property: #new_file type: #Boolean defaultValue: false)
×
194
                comment: 'Is the file of the diff is a new file'.
×
195
                
×
196
        (diff property: #renamed_file type: #Boolean defaultValue: false)
×
197
                comment:
×
198
                'Is the file of the diff has been renamed (see old_path/new_path) file'.
×
199
                
×
200
        (diff property: #deleted_file type: #Boolean defaultValue: false)
×
201
                comment: 'Is the file of the diff has been removed'
×
202
]
×
203

204
{ #category : #definition }
205
GLHMetamodelGenerator >> fileProperties [
×
206

×
207
        file property: #name type: #String
×
208
]
×
209

210
{ #category : #definition }
211
GLHMetamodelGenerator >> jobProperties [
×
212

×
213
        job property: #id type: #Number.
×
214
        job property: #allow_failure type: #Boolean.
×
215
        job property: #web_url type: #String.
×
216
        job property: #duration type: #Object.
×
217
        job property: #allow_failure type: #Boolean
×
218
]
×
219

220
{ #category : #definition }
221
GLHMetamodelGenerator >> userProperties [
×
222
        user property: #id type: #Number.
×
223
        user property: #username type: #String.
×
224
        user property: #name type: #String.
×
225
        user property: #state type: #String.
×
226
        user property: #avatar_url type: #String.
×
227
        user property: #web_url type: #String.
×
228
        user property: #created_at type: #String.
×
229
        user property: #bio type: #String.
×
230
        user property: #location type: #String.
×
231
        user property: #public_email type: #String.
×
232
        user property: #skype type: #String.
×
233
        user property: #linkedin type: #String.
×
234
        user property: #twitter type: #String.
×
235
        user property: #website_url type: #String.
×
236
        user property: #organization type: #String.
×
237
        user property: #job_title type: #String.
×
238
        user property: #pronouns type: #String.
×
239
        user property: #bot type: #String.
×
240
        user property: #work_information type: #String.
×
241
        user property: #followers type: #String.
×
242
        user property: #following type: #String
×
243
]
×
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

© 2026 Coveralls, Inc