@remogram/provider-github-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
@@ -12,7 +12,7 @@ import {
12
12
  gitAheadBehind,
13
13
  refsInventory,
14
14
  crInventory,
15
- buildMergePlanBodyFromFacts,
15
+ buildMergePlanFromProviderFacts,
16
16
  ERROR_CODES,
17
17
  forgeError,
18
18
  forgeIngestCapabilityFacts,
@@ -52,6 +52,7 @@ import {
52
52
  normalizeStatusSetState,
53
53
  statusSetIdempotencyScanCapabilityFacts,
54
54
  MAX_OPEN_PULL_IDEMPOTENCY_PAGES,
55
+ assertWriteCommandConfigured,
55
56
  } from '@remogram/core';
56
57
 
57
58
  const PUBLIC_GITHUB_HOST = 'github.com';
@@ -557,18 +558,7 @@ export async function prChecks(ctx, opts) {
557
558
  }
558
559
 
559
560
  export async function mergePlan(ctx, opts) {
560
- const view = await prView(ctx, opts);
561
- const checks = await prChecks(ctx, { number: view.pr_number });
562
- let mergeOpts = opts;
563
- if (opts.allowed_paths) {
564
- try {
565
- const crFilesBody = await crFiles(ctx, { number: view.pr_number });
566
- mergeOpts = { ...opts, changed_paths: crFilesBody.changed_paths };
567
- } catch {
568
- // Fall back to local git diff in resolveMergePlanPathScope.
569
- }
570
- }
571
- return buildMergePlanBodyFromFacts(ctx, view, checks, mergeOpts);
561
+ return buildMergePlanFromProviderFacts(ctx, opts, { prView, prChecks, crFiles });
572
562
  }
573
563
 
574
564
  export async function crFiles(ctx, { number }) {
@@ -1009,6 +999,7 @@ export async function findCommitStatusByContext(ctx, sha, context) {
1009
999
  }
1010
1000
 
1011
1001
  export async function statusSet(ctx, args) {
1002
+ assertWriteCommandConfigured(ctx.config, 'status_set');
1012
1003
  const parsed = parseStatusSetArgs(args);
1013
1004
  const existing = await findCommitStatusByContext(ctx, parsed.sha, parsed.context);
1014
1005
  if (existing) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remogram/provider-github-api",
3
- "version": "0.1.0-beta.5",
3
+ "version": "0.1.0-beta.6",
4
4
  "description": "GitHub 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
  }