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

moosetechnology / GitProjectHealth / 18782730468

24 Oct 2025 02:24PM UTC coverage: 77.8% (-0.1%) from 77.946%
18782730468

Pull #237

github

web-flow
Merge ae9317dd4 into 9215ab54a
Pull Request #237: feat(GLHModel): add position and suggestions in GLHNote

365 of 534 new or added lines in 8 files covered. (68.35%)

3 existing lines in 1 file now uncovered.

23413 of 30094 relevant lines covered (77.8%)

0.78 hits per line

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

98.88
/src/GitLabHealth-Model-Importer-Tests/GitlabMergeRequestsMock.class.st
1
Class {
2
        #name : #GitlabMergeRequestsMock,
3
        #superclass : #Object,
4
        #category : #'GitLabHealth-Model-Importer-Tests'
5
}
6

7
{ #category : #api }
8
GitlabMergeRequestsMock >> diffsOf: aMergeRequest inProject: aProjectID [
1✔
9
        "three times the same diff separated. This cas happens when asking for json output and there are more than 25 changes (grouped by changes)"
1✔
10
        ^ { '[
1✔
11
    {
1✔
12
        "diff": "@@ -67,2 +67,1 @@\n- hello 1\n- hello 1\n+ hello new",
1✔
13
        "new_path": "a/path",
1✔
14
        "old_path": "a/path",
1✔
15
        "a_mode": "100644",
1✔
16
        "b_mode": "100644",
1✔
17
        "new_file": false,
1✔
18
        "renamed_file": false,
1✔
19
        "deleted_file": false,
1✔
20
        "generated_file": false
1✔
21
    }
1✔
22
]'. '[
1✔
23
    {
24
        "diff": "@@ -67,2 +67,1 @@\n- hello 2\n- hello 2\n+ hello new",
25
        "new_path": "a/path",
26
        "old_path": "a/path",
27
        "a_mode": "100644",
28
        "b_mode": "100644",
29
        "new_file": false,
30
        "renamed_file": false,
31
        "deleted_file": false,
32
        "generated_file": false
33
    }
34
]'. '[
35
    {
36
        "diff": "@@ -67,2 +67,1 @@\n- hello 3\n- hello 3\n+ hello new",
37
        "new_path": "a/path",
38
        "old_path": "a/path",
39
        "a_mode": "100644",
40
        "b_mode": "100644",
41
        "new_file": false,
42
        "renamed_file": false,
43
        "deleted_file": false,
44
        "generated_file": false
45
    }
46
]' }
47
]
48

49
{ #category : #api }
50
GitlabMergeRequestsMock >> get: id inProject: projectId [
1✔
51

1✔
52
                ^ '{
1✔
53
        "author":{ "id": 12 },
1✔
54
        "merge_user":{ "id": 12 }
1✔
55
}'
1✔
56
]
1✔
57

58
{ #category : #api }
59
GitlabMergeRequestsMock >> getAllOfProject: anUndefinedObject [ 
1✔
60
        ^ { '[
1✔
61
  {
1✔
62
    "id": 1,
1✔
63
    "iid": 1,
1✔
64
    "project_id": 3,
1✔
65
    "title": "test1",
1✔
66
    "description": "fixed login page css paddings",
1✔
67
    "state": "merged",
1✔
68
    "imported": false,
1✔
69
    "imported_from": "none",
1✔
70
    "merged_by": {
1✔
71
      "id": 87854,
1✔
72
      "name": "Douwe Maan",
1✔
73
      "username": "DouweM",
1✔
74
      "state": "active",
1✔
75
      "avatar_url": "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
1✔
76
      "web_url": "https://gitlab.com/DouweM"
1✔
77
    },
1✔
78
    "merge_user": {
1✔
79
      "id": 87854,
1✔
80
      "name": "Douwe Maan",
1✔
81
      "username": "DouweM",
1✔
82
      "state": "active",
1✔
83
      "avatar_url": "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
1✔
84
      "web_url": "https://gitlab.com/DouweM"
1✔
85
    },
1✔
86
    "merged_at": "2018-09-07T11:16:17.520Z",
1✔
87
    "merge_after": "2018-09-07T11:16:00.000Z",
1✔
88
    "prepared_at": "2018-09-04T11:16:17.520Z",
1✔
89
    "closed_by": null,
1✔
90
    "closed_at": null,
1✔
91
    "created_at": "2017-04-29T08:46:00Z",
1✔
92
    "updated_at": "2017-04-29T08:46:00Z",
1✔
93
    "target_branch": "main",
1✔
94
    "source_branch": "test1",
1✔
95
    "upvotes": 0,
1✔
96
    "downvotes": 0,
1✔
97
    "author": {
1✔
98
      "id": 1,
1✔
99
      "name": "Administrator",
1✔
100
      "username": "admin",
1✔
101
      "state": "active",
1✔
102
      "avatar_url": null,
1✔
103
      "web_url" : "https://gitlab.example.com/admin"
1✔
104
    },
1✔
105
    "assignee": {
1✔
106
      "id": 1,
1✔
107
      "name": "Administrator",
1✔
108
      "username": "admin",
1✔
109
      "state": "active",
1✔
110
      "avatar_url": null,
1✔
111
      "web_url" : "https://gitlab.example.com/admin"
1✔
112
    },
1✔
113
    "assignees": [{
1✔
114
      "name": "Miss Monserrate Beier",
1✔
115
      "username": "axel.block",
1✔
116
      "id": 12,
1✔
117
      "state": "active",
1✔
118
      "avatar_url": "http://www.gravatar.com/avatar/46f6f7dc858ada7be1853f7fb96e81da?s=80&d=identicon",
1✔
119
      "web_url": "https://gitlab.example.com/axel.block"
1✔
120
    }],
1✔
121
    "reviewers": [{
1✔
122
      "id": 2,
1✔
123
      "name": "Sam Bauch",
1✔
124
      "username": "kenyatta_oconnell",
1✔
125
      "state": "active",
1✔
126
      "avatar_url": "https://www.gravatar.com/avatar/956c92487c6f6f7616b536927e22c9a0?s=80&d=identicon",
1✔
127
      "web_url": "http://gitlab.example.com//kenyatta_oconnell"
1✔
128
    }],
1✔
129
    "source_project_id": 2,
1✔
130
    "target_project_id": 3,
1✔
131
    "labels": [
1✔
132
      "Community contribution",
1✔
133
      "Manage"
1✔
134
    ],
1✔
135
    "draft": false,
1✔
136
    "work_in_progress": false,
1✔
137
    "milestone": {
1✔
138
      "id": 5,
1✔
139
      "iid": 1,
1✔
140
      "project_id": 3,
1✔
141
      "title": "v2.0",
1✔
142
      "description": "Assumenda aut placeat expedita exercitationem labore sunt enim earum.",
1✔
143
      "state": "closed",
1✔
144
      "created_at": "2015-02-02T19:49:26.013Z",
1✔
145
      "updated_at": "2015-02-02T19:49:26.013Z",
1✔
146
      "due_date": "2018-09-22",
1✔
147
      "start_date": "2018-08-08",
1✔
148
      "web_url": "https://gitlab.example.com/my-group/my-project/milestones/1"
1✔
149
    },
1✔
150
    "merge_when_pipeline_succeeds": true,
1✔
151
    "merge_status": "can_be_merged",
1✔
152
    "detailed_merge_status": "not_open",
1✔
153
    "sha": "8888888888888888888888888888888888888888",
1✔
154
    "merge_commit_sha": null,
1✔
155
    "squash_commit_sha": null,
1✔
156
    "user_notes_count": 1,
1✔
157
    "discussion_locked": null,
1✔
158
    "should_remove_source_branch": true,
1✔
159
    "force_remove_source_branch": false,
1✔
160
    "allow_collaboration": false,
1✔
161
    "allow_maintainer_to_push": false,
1✔
162
    "web_url": "http://gitlab.example.com/my-group/my-project/merge_requests/1",
1✔
163
    "references": {
1✔
164
      "short": "!1",
1✔
165
      "relative": "my-group/my-project!1",
1✔
166
      "full": "my-group/my-project!1"
1✔
167
    },
1✔
168
    "time_stats": {
1✔
169
      "time_estimate": 0,
1✔
170
      "total_time_spent": 0,
1✔
171
      "human_time_estimate": null,
1✔
172
      "human_total_time_spent": null
1✔
173
    },
1✔
174
    "squash": false,
1✔
175
    "task_completion_status":{
1✔
176
      "count":0,
1✔
177
      "completed_count":0
1✔
178
    }
1✔
179
  }
1✔
180
]' }
1✔
181
]
182

183
{ #category : #api }
NEW
184
GitlabMergeRequestsMock >> getAllOfProject: project withParams: params [
×
NEW
185
        ^self getAllOfProject: project
×
NEW
186
]
×
187

188
{ #category : #api }
189
GitlabMergeRequestsMock >> getByPage: anInteger perPage: anInteger2 inProject: anUndefinedObject [ 
1✔
190
        ^ '[
1✔
191
  {
1✔
192
    "id": 1,
1✔
193
    "iid": 1,
1✔
194
    "project_id": 3,
1✔
195
    "title": "test1",
1✔
196
    "description": "fixed login page css paddings",
1✔
197
    "state": "merged",
1✔
198
    "imported": false,
1✔
199
    "imported_from": "none",
1✔
200
    "merged_by": {
1✔
201
      "id": 87854,
1✔
202
      "name": "Douwe Maan",
1✔
203
      "username": "DouweM",
1✔
204
      "state": "active",
1✔
205
      "avatar_url": "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
1✔
206
      "web_url": "https://gitlab.com/DouweM"
1✔
207
    },
1✔
208
    "merge_user": {
1✔
209
      "id": 87854,
1✔
210
      "name": "Douwe Maan",
1✔
211
      "username": "DouweM",
1✔
212
      "state": "active",
1✔
213
      "avatar_url": "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
1✔
214
      "web_url": "https://gitlab.com/DouweM"
1✔
215
    },
1✔
216
    "merged_at": "2018-09-07T11:16:17.520Z",
1✔
217
    "merge_after": "2018-09-07T11:16:00.000Z",
1✔
218
    "prepared_at": "2018-09-04T11:16:17.520Z",
1✔
219
    "closed_by": null,
1✔
220
    "closed_at": null,
1✔
221
    "created_at": "2017-04-29T08:46:00Z",
1✔
222
    "updated_at": "2017-04-29T08:46:00Z",
1✔
223
    "target_branch": "main",
1✔
224
    "source_branch": "test1",
1✔
225
    "upvotes": 0,
1✔
226
    "downvotes": 0,
1✔
227
    "author": {
1✔
228
      "id": 1,
1✔
229
      "name": "Administrator",
1✔
230
      "username": "admin",
1✔
231
      "state": "active",
1✔
232
      "avatar_url": null,
1✔
233
      "web_url" : "https://gitlab.example.com/admin"
1✔
234
    },
1✔
235
    "assignee": {
1✔
236
      "id": 1,
1✔
237
      "name": "Administrator",
1✔
238
      "username": "admin",
1✔
239
      "state": "active",
1✔
240
      "avatar_url": null,
1✔
241
      "web_url" : "https://gitlab.example.com/admin"
1✔
242
    },
1✔
243
    "assignees": [{
1✔
244
      "name": "Miss Monserrate Beier",
1✔
245
      "username": "axel.block",
1✔
246
      "id": 12,
1✔
247
      "state": "active",
1✔
248
      "avatar_url": "http://www.gravatar.com/avatar/46f6f7dc858ada7be1853f7fb96e81da?s=80&d=identicon",
1✔
249
      "web_url": "https://gitlab.example.com/axel.block"
1✔
250
    }],
1✔
251
    "reviewers": [{
1✔
252
      "id": 2,
1✔
253
      "name": "Sam Bauch",
1✔
254
      "username": "kenyatta_oconnell",
1✔
255
      "state": "active",
1✔
256
      "avatar_url": "https://www.gravatar.com/avatar/956c92487c6f6f7616b536927e22c9a0?s=80&d=identicon",
1✔
257
      "web_url": "http://gitlab.example.com//kenyatta_oconnell"
1✔
258
    }],
1✔
259
    "source_project_id": 2,
1✔
260
    "target_project_id": 3,
1✔
261
    "labels": [
1✔
262
      "Community contribution",
1✔
263
      "Manage"
1✔
264
    ],
1✔
265
    "draft": false,
1✔
266
    "work_in_progress": false,
1✔
267
    "milestone": {
1✔
268
      "id": 5,
1✔
269
      "iid": 1,
1✔
270
      "project_id": 3,
1✔
271
      "title": "v2.0",
1✔
272
      "description": "Assumenda aut placeat expedita exercitationem labore sunt enim earum.",
1✔
273
      "state": "closed",
1✔
274
      "created_at": "2015-02-02T19:49:26.013Z",
1✔
275
      "updated_at": "2015-02-02T19:49:26.013Z",
1✔
276
      "due_date": "2018-09-22",
1✔
277
      "start_date": "2018-08-08",
1✔
278
      "web_url": "https://gitlab.example.com/my-group/my-project/milestones/1"
1✔
279
    },
1✔
280
    "merge_when_pipeline_succeeds": true,
1✔
281
    "merge_status": "can_be_merged",
1✔
282
    "detailed_merge_status": "not_open",
1✔
283
    "sha": "8888888888888888888888888888888888888888",
1✔
284
    "merge_commit_sha": null,
1✔
285
    "squash_commit_sha": null,
1✔
286
    "user_notes_count": 1,
1✔
287
    "discussion_locked": null,
1✔
288
    "should_remove_source_branch": true,
1✔
289
    "force_remove_source_branch": false,
1✔
290
    "allow_collaboration": false,
1✔
291
    "allow_maintainer_to_push": false,
1✔
292
    "web_url": "http://gitlab.example.com/my-group/my-project/merge_requests/1",
1✔
293
    "references": {
1✔
294
      "short": "!1",
1✔
295
      "relative": "my-group/my-project!1",
1✔
296
      "full": "my-group/my-project!1"
1✔
297
    },
1✔
298
    "time_stats": {
1✔
299
      "time_estimate": 0,
1✔
300
      "total_time_spent": 0,
1✔
301
      "human_time_estimate": null,
1✔
302
      "human_total_time_spent": null
1✔
303
    },
1✔
304
    "squash": false,
1✔
305
    "task_completion_status":{
1✔
306
      "count":0,
1✔
307
      "completed_count":0
1✔
308
    }
1✔
309
  }
1✔
310
]'
1✔
311
]
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