@aspruyt/xfg 8.5.4 → 8.5.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.
|
@@ -141,6 +141,8 @@ function mergeLabels(rootLabels, repoLabels) {
|
|
|
141
141
|
const repoLabel = repo[name];
|
|
142
142
|
if (repoLabel === false)
|
|
143
143
|
continue;
|
|
144
|
+
if (rootLabel === false && !repoLabel)
|
|
145
|
+
continue;
|
|
144
146
|
if (!inheritLabels && !repoLabel && rootLabel)
|
|
145
147
|
continue;
|
|
146
148
|
const base = rootLabel && typeof rootLabel === "object" ? rootLabel : {};
|
|
@@ -324,7 +326,7 @@ export function mergeSettings(root, perRepo) {
|
|
|
324
326
|
for (const name of allRulesetNames) {
|
|
325
327
|
const rootRuleset = rootRulesets[name];
|
|
326
328
|
const repoRuleset = repoRulesets[name];
|
|
327
|
-
if (repoRuleset === false) {
|
|
329
|
+
if (repoRuleset === false || (rootRuleset === false && !repoRuleset)) {
|
|
328
330
|
continue;
|
|
329
331
|
}
|
|
330
332
|
if (!inheritRulesets && !repoRuleset && rootRuleset) {
|
package/dist/vcs/pr-creator.d.ts
CHANGED
package/dist/vcs/pr-creator.js
CHANGED
|
@@ -1,34 +1,20 @@
|
|
|
1
|
-
import { readFileSync
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
2
|
import { join, dirname } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { createPRStrategy } from "./pr-strategy-factory.js";
|
|
5
5
|
import { PRWorkflowExecutor } from "./pr-strategy.js";
|
|
6
6
|
import { interpolateXfgContent } from "../shared/xfg-template.js";
|
|
7
7
|
import { inlineCode } from "../shared/markdown-fence.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { toErrorMessage } from "../shared/type-guards.js";
|
|
9
|
+
import { SyncError } from "../shared/errors.js";
|
|
10
|
+
const DEFAULT_TEMPLATE_PATH = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "PR.md");
|
|
11
|
+
export function loadDefaultTemplate(templatePath = DEFAULT_TEMPLATE_PATH) {
|
|
12
|
+
try {
|
|
13
13
|
return readFileSync(templatePath, "utf-8");
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
\${xfg:pr.aiSummary}
|
|
20
|
-
|
|
21
|
-
## Changes
|
|
22
|
-
|
|
23
|
-
\${xfg:pr.fileChanges}
|
|
24
|
-
|
|
25
|
-
## Source
|
|
26
|
-
|
|
27
|
-
Configuration synced using [xfg](https://github.com/anthony-spruyt/xfg).
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
_This PR was automatically generated by [xfg](https://github.com/anthony-spruyt/xfg)_`;
|
|
15
|
+
catch (error) {
|
|
16
|
+
throw new SyncError(`Failed to read default PR template ${templatePath}: ${toErrorMessage(error)}`, { cause: error });
|
|
17
|
+
}
|
|
32
18
|
}
|
|
33
19
|
const AI_SUMMARY_VAR = "${xfg:pr.aiSummary}";
|
|
34
20
|
const UNESCAPED_AI_SUMMARY_VAR = /(?<!\$)\$\{xfg:pr\.aiSummary\}/;
|
package/package.json
CHANGED