@xemahq/biomes-platform-gitlab 0.5.4 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,656 +0,0 @@
1
- import { adapterError, err, ok, } from '@xemahq/biome-sdk/adapter';
2
- import { createGitLabApi, encodePathSegment, GitLabApiError, } from './gitlab-client.factory.js';
3
- export const GITLAB_SCM_ACTION = {
4
- GET_REPOSITORY: 'get-repository',
5
- LIST_BRANCHES: 'list-branches',
6
- CREATE_BRANCH: 'create-branch',
7
- LIST_CHANGE_REQUESTS: 'list-change-requests',
8
- GET_CHANGE_REQUEST: 'get-change-request',
9
- CREATE_CHANGE_REQUEST: 'create-change-request',
10
- UPDATE_CHANGE_REQUEST: 'update-change-request',
11
- POST_COMMENT: 'post-comment',
12
- LIST_COMMENTS: 'list-comments',
13
- LIST_FILES: 'list-files',
14
- GET_FILE: 'get-file',
15
- GET_DIFF: 'get-diff',
16
- LIST_COMMITS: 'list-commits',
17
- GET_CHECKS: 'get-checks',
18
- };
19
- const CHANGE_REQUEST_STATUS = {
20
- OPEN: 'open',
21
- MERGED: 'merged',
22
- CLOSED: 'closed',
23
- };
24
- const CHECK_STATUS = {
25
- QUEUED: 'queued',
26
- IN_PROGRESS: 'in_progress',
27
- COMPLETED: 'completed',
28
- };
29
- const CHECK_CONCLUSION = {
30
- SUCCESS: 'success',
31
- FAILURE: 'failure',
32
- PENDING: 'pending',
33
- ERROR: 'error',
34
- };
35
- const DEFAULT_COMMIT_LIMIT = 30;
36
- function requireString(params, key, action) {
37
- const value = params[key];
38
- if (typeof value !== 'string' || value.length === 0) {
39
- return err(adapterError('malformed-payload', `gitlab ${action}: missing required param "${key}"`));
40
- }
41
- return ok(value);
42
- }
43
- function optionalString(params, key, action) {
44
- const value = params[key];
45
- if (value === undefined || value === null) {
46
- return ok(undefined);
47
- }
48
- if (typeof value !== 'string') {
49
- return err(adapterError('malformed-payload', `gitlab ${action}: param "${key}" must be a string when present`));
50
- }
51
- return ok(value);
52
- }
53
- function optionalPositiveInt(params, key, action) {
54
- const value = params[key];
55
- if (value === undefined || value === null) {
56
- return ok(undefined);
57
- }
58
- if (typeof value !== 'number' || !Number.isInteger(value) || value <= 0) {
59
- return err(adapterError('malformed-payload', `gitlab ${action}: param "${key}" must be a positive integer when present`));
60
- }
61
- return ok(value);
62
- }
63
- function resolveTarget(input, action) {
64
- const projectPath = requireString(input.params, 'projectPath', action);
65
- if (!projectPath.ok) {
66
- return projectPath;
67
- }
68
- const apiUrl = optionalString(input.params, 'apiUrl', action);
69
- if (!apiUrl.ok) {
70
- return apiUrl;
71
- }
72
- const token = input.credential.accessToken;
73
- if (typeof token !== 'string' || token.length === 0) {
74
- return err(adapterError('unauthorized', `gitlab ${action}: the resolved connection credential carries no access token`));
75
- }
76
- return ok({
77
- encodedProjectPath: encodePathSegment(projectPath.value),
78
- api: createGitLabApi(apiUrl.value ?? '', token, input.credential.tokenType),
79
- });
80
- }
81
- function toAdapterError(cause) {
82
- if (cause instanceof GitLabApiError) {
83
- switch (cause.kind) {
84
- case 'unauthorized':
85
- return adapterError('unauthorized', cause.message);
86
- case 'not-found':
87
- return adapterError('not-found', cause.message);
88
- case 'rate-limited':
89
- return adapterError('rate-limited', cause.message, cause.retryAfterSec === undefined
90
- ? undefined
91
- : { retryAfterSec: cause.retryAfterSec });
92
- case 'upstream':
93
- default:
94
- return adapterError('upstream-unavailable', cause.message);
95
- }
96
- }
97
- return adapterError('internal', `gitlab action failed: ${cause instanceof Error ? cause.message : String(cause)}`);
98
- }
99
- function mapMergeRequest(mr) {
100
- const status = mr.state === 'merged'
101
- ? CHANGE_REQUEST_STATUS.MERGED
102
- : mr.state === 'closed'
103
- ? CHANGE_REQUEST_STATUS.CLOSED
104
- : CHANGE_REQUEST_STATUS.OPEN;
105
- const changeRequest = {
106
- id: String(mr.iid),
107
- externalId: String(mr.id),
108
- sourceBranch: mr.source_branch ?? '',
109
- targetBranch: mr.target_branch ?? '',
110
- title: mr.title ?? '',
111
- status,
112
- createdAt: mr.created_at ?? '',
113
- updatedAt: mr.updated_at ?? '',
114
- };
115
- if (mr.description !== undefined) {
116
- changeRequest.description = mr.description;
117
- }
118
- if (mr.author?.username !== undefined) {
119
- changeRequest.authorId = mr.author.username;
120
- }
121
- if (mr.sha !== undefined) {
122
- changeRequest.headCommit = mr.sha;
123
- }
124
- return changeRequest;
125
- }
126
- function mapNote(note, changeRequestId) {
127
- return {
128
- id: String(note.id),
129
- changeRequestId,
130
- body: note.body ?? '',
131
- authorId: note.author?.username ?? 'unknown',
132
- authorType: 'human',
133
- createdAt: note.created_at ?? '',
134
- };
135
- }
136
- function mapPipelineState(state) {
137
- switch (state) {
138
- case 'success':
139
- case 'skipped':
140
- return {
141
- status: CHECK_STATUS.COMPLETED,
142
- conclusion: CHECK_CONCLUSION.SUCCESS,
143
- };
144
- case 'failed':
145
- case 'canceled':
146
- return {
147
- status: CHECK_STATUS.COMPLETED,
148
- conclusion: CHECK_CONCLUSION.FAILURE,
149
- };
150
- case 'running':
151
- return {
152
- status: CHECK_STATUS.IN_PROGRESS,
153
- conclusion: CHECK_CONCLUSION.PENDING,
154
- };
155
- default:
156
- return {
157
- status: CHECK_STATUS.QUEUED,
158
- conclusion: CHECK_CONCLUSION.PENDING,
159
- };
160
- }
161
- }
162
- export function mapGitlabPipelines(pipelines) {
163
- const latest = pipelines[0];
164
- if (!latest) {
165
- return [];
166
- }
167
- const { status, conclusion } = mapPipelineState(latest.status);
168
- const check = {
169
- name: latest.name ?? (latest.id ? `pipeline #${latest.id}` : 'pipeline'),
170
- status,
171
- conclusion,
172
- };
173
- if (latest.web_url) {
174
- check.detailsUrl = latest.web_url;
175
- }
176
- return [check];
177
- }
178
- export function aggregateChecks(checks) {
179
- if (checks.length === 0) {
180
- return { conclusion: CHECK_CONCLUSION.SUCCESS, checks };
181
- }
182
- const conclusions = new Set(checks.map((c) => c.conclusion));
183
- const conclusion = conclusions.has(CHECK_CONCLUSION.PENDING)
184
- ? CHECK_CONCLUSION.PENDING
185
- : conclusions.has(CHECK_CONCLUSION.FAILURE)
186
- ? CHECK_CONCLUSION.FAILURE
187
- : conclusions.has(CHECK_CONCLUSION.ERROR)
188
- ? CHECK_CONCLUSION.ERROR
189
- : CHECK_CONCLUSION.SUCCESS;
190
- return { conclusion, checks };
191
- }
192
- const TARGET_PROPERTIES = {
193
- projectPath: {
194
- type: 'string',
195
- description: 'GitLab project path, "group/project" (or "group/subgroup/project"). Encoded by the connector.',
196
- },
197
- apiUrl: {
198
- type: 'string',
199
- description: 'OPTIONAL base URL of a self-hosted GitLab instance. Defaults to https://gitlab.com.',
200
- },
201
- };
202
- const TARGET_REQUIRED = ['projectPath'];
203
- function defineScmAction(action, properties, required, run) {
204
- return {
205
- action,
206
- schema: {
207
- type: 'object',
208
- properties: { ...TARGET_PROPERTIES, ...properties },
209
- required: [...TARGET_REQUIRED, ...required],
210
- },
211
- async execute(input) {
212
- const target = resolveTarget(input, action);
213
- if (!target.ok) {
214
- return target;
215
- }
216
- try {
217
- return await run(target.value, input.params);
218
- }
219
- catch (cause) {
220
- return err(toAdapterError(cause));
221
- }
222
- },
223
- };
224
- }
225
- const getRepository = defineScmAction(GITLAB_SCM_ACTION.GET_REPOSITORY, {}, [], async ({ api, encodedProjectPath }) => {
226
- const data = await api.request({
227
- method: 'GET',
228
- path: `/projects/${encodedProjectPath}`,
229
- });
230
- const repository = {
231
- id: String(data.id),
232
- provider: 'gitlab',
233
- defaultBranch: data.default_branch ?? 'main',
234
- isActive: !data.archived,
235
- contentBrowsingEnabled: true,
236
- };
237
- const remoteUrl = data.http_url_to_repo ?? data.web_url;
238
- if (remoteUrl !== undefined) {
239
- repository.remoteUrl = remoteUrl;
240
- }
241
- return ok({ externalId: String(data.id), outputs: { repository } });
242
- });
243
- const listBranches = defineScmAction(GITLAB_SCM_ACTION.LIST_BRANCHES, {}, [], async ({ api, encodedProjectPath }) => {
244
- const data = await api.request({
245
- method: 'GET',
246
- path: `/projects/${encodedProjectPath}/repository/branches`,
247
- query: { per_page: '100' },
248
- });
249
- return ok({
250
- outputs: {
251
- branches: data.map((b) => ({
252
- name: b.name,
253
- commit: b.commit?.id ?? '',
254
- isDefault: b.default === true,
255
- })),
256
- },
257
- });
258
- });
259
- const createBranch = defineScmAction(GITLAB_SCM_ACTION.CREATE_BRANCH, {
260
- name: { type: 'string', description: 'Name of the branch to create.' },
261
- fromRef: {
262
- type: 'string',
263
- description: 'Ref the branch is cut from. Defaults to "main".',
264
- },
265
- }, ['name'], async ({ api, encodedProjectPath }, params) => {
266
- const name = requireString(params, 'name', GITLAB_SCM_ACTION.CREATE_BRANCH);
267
- if (!name.ok) {
268
- return name;
269
- }
270
- const fromRef = optionalString(params, 'fromRef', GITLAB_SCM_ACTION.CREATE_BRANCH);
271
- if (!fromRef.ok) {
272
- return fromRef;
273
- }
274
- const data = await api.request({
275
- method: 'POST',
276
- path: `/projects/${encodedProjectPath}/repository/branches`,
277
- body: { branch: name.value, ref: fromRef.value ?? 'main' },
278
- });
279
- return ok({
280
- externalId: data.name,
281
- outputs: {
282
- branch: {
283
- name: data.name,
284
- commit: data.commit?.id ?? '',
285
- isDefault: false,
286
- },
287
- },
288
- });
289
- });
290
- const listChangeRequests = defineScmAction(GITLAB_SCM_ACTION.LIST_CHANGE_REQUESTS, {}, [], async ({ api, encodedProjectPath }) => {
291
- const data = await api.request({
292
- method: 'GET',
293
- path: `/projects/${encodedProjectPath}/merge_requests`,
294
- query: {
295
- state: 'all',
296
- per_page: '50',
297
- order_by: 'updated_at',
298
- sort: 'desc',
299
- },
300
- });
301
- return ok({ outputs: { changeRequests: data.map(mapMergeRequest) } });
302
- });
303
- const getChangeRequest = defineScmAction(GITLAB_SCM_ACTION.GET_CHANGE_REQUEST, {
304
- changeRequestId: {
305
- type: 'string',
306
- description: 'Merge-request IID within the project.',
307
- },
308
- }, ['changeRequestId'], async ({ api, encodedProjectPath }, params) => {
309
- const id = requireString(params, 'changeRequestId', GITLAB_SCM_ACTION.GET_CHANGE_REQUEST);
310
- if (!id.ok) {
311
- return id;
312
- }
313
- const data = await api.request({
314
- method: 'GET',
315
- path: `/projects/${encodedProjectPath}/merge_requests/${encodePathSegment(id.value)}`,
316
- });
317
- return ok({
318
- externalId: String(data.id),
319
- outputs: { changeRequest: mapMergeRequest(data) },
320
- });
321
- });
322
- const createChangeRequest = defineScmAction(GITLAB_SCM_ACTION.CREATE_CHANGE_REQUEST, {
323
- sourceBranch: { type: 'string', description: 'Branch to merge FROM.' },
324
- targetBranch: { type: 'string', description: 'Branch to merge INTO.' },
325
- title: { type: 'string', description: 'Merge-request title.' },
326
- description: {
327
- type: 'string',
328
- description: 'Merge-request description. Defaults to empty.',
329
- },
330
- }, ['sourceBranch', 'targetBranch', 'title'], async ({ api, encodedProjectPath }, params) => {
331
- const action = GITLAB_SCM_ACTION.CREATE_CHANGE_REQUEST;
332
- const sourceBranch = requireString(params, 'sourceBranch', action);
333
- if (!sourceBranch.ok) {
334
- return sourceBranch;
335
- }
336
- const targetBranch = requireString(params, 'targetBranch', action);
337
- if (!targetBranch.ok) {
338
- return targetBranch;
339
- }
340
- const title = requireString(params, 'title', action);
341
- if (!title.ok) {
342
- return title;
343
- }
344
- const description = optionalString(params, 'description', action);
345
- if (!description.ok) {
346
- return description;
347
- }
348
- const data = await api.request({
349
- method: 'POST',
350
- path: `/projects/${encodedProjectPath}/merge_requests`,
351
- body: {
352
- source_branch: sourceBranch.value,
353
- target_branch: targetBranch.value,
354
- title: title.value,
355
- description: description.value ?? '',
356
- },
357
- });
358
- return ok({
359
- externalId: String(data.id),
360
- outputs: { changeRequest: mapMergeRequest(data) },
361
- });
362
- });
363
- const updateChangeRequest = defineScmAction(GITLAB_SCM_ACTION.UPDATE_CHANGE_REQUEST, {
364
- changeRequestId: {
365
- type: 'string',
366
- description: 'Merge-request IID within the project.',
367
- },
368
- title: { type: 'string', description: 'New title.' },
369
- status: {
370
- type: 'string',
371
- description: 'New status — "closed" closes the merge request, "open" reopens it. Any other value changes no state.',
372
- },
373
- }, ['changeRequestId'], async ({ api, encodedProjectPath }, params) => {
374
- const action = GITLAB_SCM_ACTION.UPDATE_CHANGE_REQUEST;
375
- const id = requireString(params, 'changeRequestId', action);
376
- if (!id.ok) {
377
- return id;
378
- }
379
- const title = optionalString(params, 'title', action);
380
- if (!title.ok) {
381
- return title;
382
- }
383
- const status = optionalString(params, 'status', action);
384
- if (!status.ok) {
385
- return status;
386
- }
387
- const body = {};
388
- if (title.value !== undefined && title.value.length > 0) {
389
- body.title = title.value;
390
- }
391
- if (status.value === CHANGE_REQUEST_STATUS.CLOSED) {
392
- body.state_event = 'close';
393
- }
394
- if (status.value === CHANGE_REQUEST_STATUS.OPEN) {
395
- body.state_event = 'reopen';
396
- }
397
- const data = await api.request({
398
- method: 'PUT',
399
- path: `/projects/${encodedProjectPath}/merge_requests/${encodePathSegment(id.value)}`,
400
- body,
401
- });
402
- return ok({
403
- externalId: String(data.id),
404
- outputs: { changeRequest: mapMergeRequest(data) },
405
- });
406
- });
407
- const postComment = defineScmAction(GITLAB_SCM_ACTION.POST_COMMENT, {
408
- changeRequestId: {
409
- type: 'string',
410
- description: 'Merge-request IID to comment on.',
411
- },
412
- body: { type: 'string', description: 'Comment body (GitLab note).' },
413
- }, ['changeRequestId', 'body'], async ({ api, encodedProjectPath }, params) => {
414
- const action = GITLAB_SCM_ACTION.POST_COMMENT;
415
- const id = requireString(params, 'changeRequestId', action);
416
- if (!id.ok) {
417
- return id;
418
- }
419
- const content = requireString(params, 'body', action);
420
- if (!content.ok) {
421
- return content;
422
- }
423
- const data = await api.request({
424
- method: 'POST',
425
- path: `/projects/${encodedProjectPath}/merge_requests/${encodePathSegment(id.value)}/notes`,
426
- body: { body: content.value },
427
- });
428
- return ok({
429
- externalId: String(data.id),
430
- outputs: { comment: mapNote(data, id.value) },
431
- });
432
- });
433
- const listComments = defineScmAction(GITLAB_SCM_ACTION.LIST_COMMENTS, {
434
- changeRequestId: {
435
- type: 'string',
436
- description: 'Merge-request IID whose notes to list.',
437
- },
438
- }, ['changeRequestId'], async ({ api, encodedProjectPath }, params) => {
439
- const id = requireString(params, 'changeRequestId', GITLAB_SCM_ACTION.LIST_COMMENTS);
440
- if (!id.ok) {
441
- return id;
442
- }
443
- const data = await api.request({
444
- method: 'GET',
445
- path: `/projects/${encodedProjectPath}/merge_requests/${encodePathSegment(id.value)}/notes`,
446
- query: { per_page: '100', sort: 'asc' },
447
- });
448
- return ok({
449
- outputs: {
450
- comments: data
451
- .filter((n) => !n.system)
452
- .map((n) => mapNote(n, id.value)),
453
- },
454
- });
455
- });
456
- const listFiles = defineScmAction(GITLAB_SCM_ACTION.LIST_FILES, {
457
- path: {
458
- type: 'string',
459
- description: 'Directory path to list. Empty string lists the root.',
460
- },
461
- ref: { type: 'string', description: 'Branch, tag or commit sha.' },
462
- }, ['path'], async ({ api, encodedProjectPath }, params) => {
463
- const action = GITLAB_SCM_ACTION.LIST_FILES;
464
- const rawPath = optionalString(params, 'path', action);
465
- if (!rawPath.ok) {
466
- return rawPath;
467
- }
468
- const ref = optionalString(params, 'ref', action);
469
- if (!ref.ok) {
470
- return ref;
471
- }
472
- const safePath = (rawPath.value ?? '').replace(/^\/+/, '');
473
- const query = { per_page: '100' };
474
- if (ref.value) {
475
- query.ref = ref.value;
476
- }
477
- if (safePath) {
478
- query.path = safePath;
479
- }
480
- const data = await api.request({
481
- method: 'GET',
482
- path: `/projects/${encodedProjectPath}/repository/tree`,
483
- query,
484
- });
485
- return ok({
486
- outputs: {
487
- entries: data.map((e) => {
488
- const entry = {
489
- name: e.name,
490
- path: e.path,
491
- type: e.type === 'tree' ? 'dir' : 'file',
492
- };
493
- if (e.id !== undefined) {
494
- entry.sha = e.id;
495
- }
496
- return entry;
497
- }),
498
- },
499
- });
500
- });
501
- const getFile = defineScmAction(GITLAB_SCM_ACTION.GET_FILE, {
502
- path: { type: 'string', description: 'File path within the repository.' },
503
- ref: { type: 'string', description: 'Branch, tag or commit sha.' },
504
- }, ['path'], async ({ api, encodedProjectPath }, params) => {
505
- const action = GITLAB_SCM_ACTION.GET_FILE;
506
- const rawPath = requireString(params, 'path', action);
507
- if (!rawPath.ok) {
508
- return rawPath;
509
- }
510
- const ref = optionalString(params, 'ref', action);
511
- if (!ref.ok) {
512
- return ref;
513
- }
514
- const safePath = rawPath.value.replace(/^\/+/, '');
515
- const data = await api.request({
516
- method: 'GET',
517
- path: `/projects/${encodedProjectPath}/repository/files/${encodePathSegment(safePath)}`,
518
- ...(ref.value === undefined ? {} : { query: { ref: ref.value } }),
519
- });
520
- const content = data.content
521
- ? Buffer.from(data.content, data.encoding === 'base64' ? 'base64' : 'utf-8').toString('utf-8')
522
- : '';
523
- const file = {
524
- path: safePath,
525
- content,
526
- encoding: 'utf-8',
527
- size: data.size ?? content.length,
528
- };
529
- const sha = data.blob_id ?? data.content_sha256;
530
- if (sha !== undefined) {
531
- file.sha = sha;
532
- }
533
- return ok({ outputs: { file } });
534
- });
535
- const getDiff = defineScmAction(GITLAB_SCM_ACTION.GET_DIFF, {
536
- base: { type: 'string', description: 'Ref to compare FROM.' },
537
- head: { type: 'string', description: 'Ref to compare TO.' },
538
- }, ['base', 'head'], async ({ api, encodedProjectPath }, params) => {
539
- const action = GITLAB_SCM_ACTION.GET_DIFF;
540
- const base = requireString(params, 'base', action);
541
- if (!base.ok) {
542
- return base;
543
- }
544
- const head = requireString(params, 'head', action);
545
- if (!head.ok) {
546
- return head;
547
- }
548
- const data = await api.request({
549
- method: 'GET',
550
- path: `/projects/${encodedProjectPath}/repository/compare`,
551
- query: { from: base.value, to: head.value },
552
- });
553
- const diff = {
554
- base: base.value,
555
- head: head.value,
556
- files: (data.diffs ?? []).map((d) => {
557
- const file = {
558
- filename: d.new_path,
559
- status: d.new_file
560
- ? 'added'
561
- : d.deleted_file
562
- ? 'removed'
563
- : d.renamed_file
564
- ? 'renamed'
565
- : 'modified',
566
- additions: 0,
567
- deletions: 0,
568
- };
569
- if (d.diff !== undefined) {
570
- file.patch = d.diff;
571
- }
572
- return file;
573
- }),
574
- };
575
- if (data.commits) {
576
- diff.stats = {
577
- additions: 0,
578
- deletions: 0,
579
- changes: data.diffs?.length ?? 0,
580
- };
581
- }
582
- return ok({ outputs: { diff } });
583
- });
584
- const listCommits = defineScmAction(GITLAB_SCM_ACTION.LIST_COMMITS, {
585
- ref: { type: 'string', description: 'Branch, tag or commit sha.' },
586
- limit: {
587
- type: 'number',
588
- description: `Maximum commits to return. Defaults to ${DEFAULT_COMMIT_LIMIT}.`,
589
- },
590
- }, [], async ({ api, encodedProjectPath }, params) => {
591
- const action = GITLAB_SCM_ACTION.LIST_COMMITS;
592
- const ref = optionalString(params, 'ref', action);
593
- if (!ref.ok) {
594
- return ref;
595
- }
596
- const limit = optionalPositiveInt(params, 'limit', action);
597
- if (!limit.ok) {
598
- return limit;
599
- }
600
- const query = {
601
- per_page: String(limit.value ?? DEFAULT_COMMIT_LIMIT),
602
- };
603
- if (ref.value) {
604
- query.ref_name = ref.value;
605
- }
606
- const data = await api.request({
607
- method: 'GET',
608
- path: `/projects/${encodedProjectPath}/repository/commits`,
609
- query,
610
- });
611
- return ok({
612
- outputs: {
613
- commits: data.map((c) => ({
614
- sha: c.id,
615
- message: c.message ?? '',
616
- authorName: c.author_name ?? '',
617
- authorEmail: c.author_email ?? '',
618
- date: c.created_at ?? '',
619
- })),
620
- },
621
- });
622
- });
623
- const getChecks = defineScmAction(GITLAB_SCM_ACTION.GET_CHECKS, {
624
- headSha: {
625
- type: 'string',
626
- description: 'Commit sha whose CI pipelines to normalize.',
627
- },
628
- }, ['headSha'], async ({ api, encodedProjectPath }, params) => {
629
- const headSha = requireString(params, 'headSha', GITLAB_SCM_ACTION.GET_CHECKS);
630
- if (!headSha.ok) {
631
- return headSha;
632
- }
633
- const pipelines = await api.request({
634
- method: 'GET',
635
- path: `/projects/${encodedProjectPath}/pipelines`,
636
- query: { sha: headSha.value },
637
- });
638
- return ok({ outputs: aggregateChecks(mapGitlabPipelines(pipelines)) });
639
- });
640
- export const gitlabScmActions = {
641
- [GITLAB_SCM_ACTION.GET_REPOSITORY]: getRepository,
642
- [GITLAB_SCM_ACTION.LIST_BRANCHES]: listBranches,
643
- [GITLAB_SCM_ACTION.CREATE_BRANCH]: createBranch,
644
- [GITLAB_SCM_ACTION.LIST_CHANGE_REQUESTS]: listChangeRequests,
645
- [GITLAB_SCM_ACTION.GET_CHANGE_REQUEST]: getChangeRequest,
646
- [GITLAB_SCM_ACTION.CREATE_CHANGE_REQUEST]: createChangeRequest,
647
- [GITLAB_SCM_ACTION.UPDATE_CHANGE_REQUEST]: updateChangeRequest,
648
- [GITLAB_SCM_ACTION.POST_COMMENT]: postComment,
649
- [GITLAB_SCM_ACTION.LIST_COMMENTS]: listComments,
650
- [GITLAB_SCM_ACTION.LIST_FILES]: listFiles,
651
- [GITLAB_SCM_ACTION.GET_FILE]: getFile,
652
- [GITLAB_SCM_ACTION.GET_DIFF]: getDiff,
653
- [GITLAB_SCM_ACTION.LIST_COMMITS]: listCommits,
654
- [GITLAB_SCM_ACTION.GET_CHECKS]: getChecks,
655
- };
656
- //# sourceMappingURL=scm-actions.js.map