@remogram/provider-gitlab-api 0.1.0-beta.5 → 0.1.0-beta.6

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.
Files changed (2) hide show
  1. package/index.js +4 -13
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  gitAheadBehind,
11
11
  refsInventory,
12
12
  crInventory,
13
- buildMergePlanBodyFromFacts,
13
+ buildMergePlanFromProviderFacts,
14
14
  ERROR_CODES,
15
15
  forgeError,
16
16
  forgeIngestCapabilityFacts,
@@ -51,6 +51,7 @@ import {
51
51
  normalizeStatusSetState,
52
52
  MAX_OPEN_PULL_IDEMPOTENCY_PAGES,
53
53
  statusSetIdempotencyScanCapabilityFacts,
54
+ assertWriteCommandConfigured,
54
55
  } from '@remogram/core';
55
56
 
56
57
  const PUBLIC_GITLAB_HOST = 'gitlab.com';
@@ -365,18 +366,7 @@ export async function prChecks(ctx, opts) {
365
366
  }
366
367
 
367
368
  export async function mergePlan(ctx, opts) {
368
- const view = await prView(ctx, opts);
369
- const checks = await prChecks(ctx, { number: view.pr_number });
370
- let mergeOpts = opts;
371
- if (opts.allowed_paths) {
372
- try {
373
- const crFilesBody = await crFiles(ctx, { number: view.pr_number });
374
- mergeOpts = { ...opts, changed_paths: crFilesBody.changed_paths };
375
- } catch {
376
- // Fall back to local git diff in resolveMergePlanPathScope.
377
- }
378
- }
379
- return buildMergePlanBodyFromFacts(ctx, view, checks, mergeOpts);
369
+ return buildMergePlanFromProviderFacts(ctx, opts, { prView, prChecks, crFiles });
380
370
  }
381
371
 
382
372
  export async function crFiles(ctx, { number }) {
@@ -866,6 +856,7 @@ export async function findCommitStatusByContext(ctx, sha, context) {
866
856
  }
867
857
 
868
858
  export async function statusSet(ctx, args) {
859
+ assertWriteCommandConfigured(ctx.config, 'status_set');
869
860
  const parsed = parseStatusSetArgs(args);
870
861
  const existing = await findCommitStatusByContext(ctx, parsed.sha, parsed.context);
871
862
  if (existing) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remogram/provider-gitlab-api",
3
- "version": "0.1.0-beta.5",
3
+ "version": "0.1.0-beta.6",
4
4
  "description": "GitLab API provider for remogram",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  "node": ">=20"
23
23
  },
24
24
  "dependencies": {
25
- "@remogram/core": "0.1.0-beta.5"
25
+ "@remogram/core": "0.1.0-beta.6"
26
26
  }
27
27
  }