@biffo/cli 0.249.0 → 0.249.2
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.
- package/dist/index.js +12 -1
- package/package.json +1 -1
- package/scripts/verify.sh +23 -3
package/dist/index.js
CHANGED
|
@@ -613,6 +613,10 @@ var DivergenceConfigSchema = z3.object({
|
|
|
613
613
|
note: z3.string().optional(),
|
|
614
614
|
warnOnly: z3.array(DivergenceEntrySchema).default([])
|
|
615
615
|
});
|
|
616
|
+
function classifyRepoOwnership(repoRoot) {
|
|
617
|
+
if (isInstanceRepo(repoRoot)) return "instance";
|
|
618
|
+
return existsSync4(join4(repoRoot, CORE_MANIFEST_FILE)) ? "template" : "satellite";
|
|
619
|
+
}
|
|
616
620
|
function readDivergenceConfig(repoRoot) {
|
|
617
621
|
const path = join4(repoRoot, DIVERGENCE_FILE);
|
|
618
622
|
if (!existsSync4(path)) return { warnOnly: [] };
|
|
@@ -9682,10 +9686,17 @@ async function runOwnershipCheck(argv) {
|
|
|
9682
9686
|
const staged = stagedFlag !== -1;
|
|
9683
9687
|
const messageFile = staged ? args[stagedFlag + 1] : void 0;
|
|
9684
9688
|
const root = (await execa7("git", ["rev-parse", "--show-toplevel"])).stdout.trim();
|
|
9685
|
-
|
|
9689
|
+
const ownership = classifyRepoOwnership(root);
|
|
9690
|
+
if (ownership === "template") {
|
|
9686
9691
|
console.log("\u2713 core ownership guard: skipped \u2014 this is the template, which owns these paths.");
|
|
9687
9692
|
return;
|
|
9688
9693
|
}
|
|
9694
|
+
if (ownership === "satellite") {
|
|
9695
|
+
console.log(
|
|
9696
|
+
"\u2713 core ownership guard: skipped \u2014 this repo is not an instance, so it holds no template-owned paths."
|
|
9697
|
+
);
|
|
9698
|
+
return;
|
|
9699
|
+
}
|
|
9689
9700
|
let changedFiles;
|
|
9690
9701
|
let deletedFiles = [];
|
|
9691
9702
|
let commitMessage = "";
|
package/package.json
CHANGED
package/scripts/verify.sh
CHANGED
|
@@ -411,8 +411,27 @@ else
|
|
|
411
411
|
NO_CI=1
|
|
412
412
|
fi
|
|
413
413
|
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
# release-guards.yml (#1319): the "Release Guards" job's own trigger needed
|
|
415
|
+
# `edited` added to it (so a PR title/body correction re-evaluates
|
|
416
|
+
# automatically), and giving that trigger to the WHOLE build matrix in
|
|
417
|
+
# ci.yml would re-run every heavy job on every description tweak -- so the
|
|
418
|
+
# job moved to this second file instead (see that file's own header). Its
|
|
419
|
+
# absence does NOT mean "no CI to mirror" -- ci.yml alone is still a real CI
|
|
420
|
+
# and NO_CI must not fire just because a repo has not adopted the split (a
|
|
421
|
+
# sibling never will; an instance not yet upgraded past #1319 has not yet).
|
|
422
|
+
# But if it EXISTS and cannot be READ, that is the identical #1218 shape as
|
|
423
|
+
# ci.yml itself, and ci_has() must search it too or "practices-monotonic"
|
|
424
|
+
# (moved into it) would silently stop being locally mirrored the moment it
|
|
425
|
+
# left ci.yml -- covered less than verify.sh claims, with nothing saying so.
|
|
426
|
+
RELEASE_GUARDS_YML_UNREADABLE=""
|
|
427
|
+
if [ -f .github/workflows/release-guards.yml ] && [ ! -r .github/workflows/release-guards.yml ]; then
|
|
428
|
+
RELEASE_GUARDS_YML_UNREADABLE=1
|
|
429
|
+
fi
|
|
430
|
+
|
|
431
|
+
if [ -n "$CI_YML_UNREADABLE" ] || [ -n "$RELEASE_GUARDS_YML_UNREADABLE" ]; then
|
|
432
|
+
printf '\n\033[31mverify: CANNOT TELL - a core workflow file exists but could not be read\033[0m\n'
|
|
433
|
+
[ -n "$CI_YML_UNREADABLE" ] && printf ' .github/workflows/ci.yml\n'
|
|
434
|
+
[ -n "$RELEASE_GUARDS_YML_UNREADABLE" ] && printf ' .github/workflows/release-guards.yml\n'
|
|
416
435
|
printf 'Permissions, a partial checkout, or a filesystem error -- not "no CI to\n'
|
|
417
436
|
printf 'mirror" (that is a missing ci.yml, handled separately, and does not\n'
|
|
418
437
|
printf 'block). Every check gated on ci_has() would silently be skipped and the\n'
|
|
@@ -424,7 +443,8 @@ fi
|
|
|
424
443
|
|
|
425
444
|
ci_has() {
|
|
426
445
|
[ -n "${NO_CI:-}" ] && return 0
|
|
427
|
-
grep -qE "$1" .github/workflows/ci.yml
|
|
446
|
+
grep -qE "$1" .github/workflows/ci.yml && return 0
|
|
447
|
+
[ -f .github/workflows/release-guards.yml ] && grep -qE "$1" .github/workflows/release-guards.yml
|
|
428
448
|
}
|
|
429
449
|
|
|
430
450
|
have_script() {
|