@intentius/chant 0.124.65 → 0.124.66
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/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +3 -1
- package/dist/components/unchanged-inputs.d.ts.map +1 -1
- package/dist/components/unchanged-inputs.js +1 -2
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +1 -2
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +3 -1
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/wave-runtime.mjs +311 -311
- package/package.json +1 -1
- package/src/cli/handlers/pr.ts +3 -1
- package/src/components/unchanged-inputs.ts +1 -2
- package/src/lifecycle/release-store.ts +1 -2
- package/src/pr-forge.ts +3 -1
- package/src/pr-requires.test.ts +10 -0
- package/src/release-floors.ts +1 -1
package/package.json
CHANGED
package/src/cli/handlers/pr.ts
CHANGED
|
@@ -1498,7 +1498,9 @@ async function beforeMergeChecks(ctx: CommandContext): Promise<PrBeforeMerge | n
|
|
|
1498
1498
|
// The apply's own statuses never hold it back: chant ci run's, and the report's.
|
|
1499
1499
|
// Nor does the plan's: a policy denial fails it, and the denial is only recorded when the apply judges it (plywood#66).
|
|
1500
1500
|
// #4550: under a product's words its own prefix too.
|
|
1501
|
-
|
|
1501
|
+
// plywood#66: the forge also reports the pull-request pipeline's plan job, `chant-pr.<member>.<env> / plan (<event>)`, which a denial fails too.
|
|
1502
|
+
const planJob = [`chant-pr.${member ?? "*"}.${ctx.args.env ?? "*"} / plan*`];
|
|
1503
|
+
const ignore = [...new Set([productContext(activeProductWords(), gate), productContext(activeProductWords(), PR_APPLY_GATE), `chant/${gate}`, `chant/${PR_APPLY_GATE}`, prStatusContext("apply", member), prStatusContext("plan"), `${prStatusContext("plan")}/`, ...planJob])];
|
|
1502
1504
|
// ws-106 gives the declaration no way to leave a check out, so with no --requires all four are asked (#4336, #4607).
|
|
1503
1505
|
const requires = await checkPrRequires(forge, args.pr, head, { ignore, ...(only ? { only: only.checks } : {}) });
|
|
1504
1506
|
for (const r of requires) console.error(formatInfo(`${r.name}: ${r.passed ? "passed" : r.pending ? "pending" : "unmet"}, ${r.reason}`));
|
|
@@ -40,10 +40,9 @@ import type { ComponentInputs } from "./component";
|
|
|
40
40
|
import type { Release } from "../lifecycle/release-store";
|
|
41
41
|
import type { ReleaseRecord, ReleaseRecordInput, RunOrigin } from "../lifecycle/release-ledger";
|
|
42
42
|
import { releaseTemplatesDigest } from "./release-promote";
|
|
43
|
-
import { NEXT_RELEASE } from "../release-floors";
|
|
44
43
|
|
|
45
44
|
/** The first chant that reads a component's `inputs` and writes `unchangedSince` on a release record (#4695). */
|
|
46
|
-
export const UNCHANGED_INPUTS_FLOOR =
|
|
45
|
+
export const UNCHANGED_INPUTS_FLOOR = "0.124.65";
|
|
47
46
|
|
|
48
47
|
/** Whether a component's inputs are the same as in the release the environment runs it from. */
|
|
49
48
|
export type InputsVerdict =
|
|
@@ -55,7 +55,6 @@ import {
|
|
|
55
55
|
type LedgerLocation,
|
|
56
56
|
} from "./git";
|
|
57
57
|
import type { RunOrigin } from "./release-ledger";
|
|
58
|
-
import { NEXT_RELEASE } from "../release-floors";
|
|
59
58
|
|
|
60
59
|
/** The directory on `chant/lifecycle` that holds releases, cuts and template bytes. */
|
|
61
60
|
export const RELEASES_DIR = "_releases";
|
|
@@ -89,7 +88,7 @@ export interface ReleaseArtifact {
|
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
/** The first chant that writes and reads an artifact's `ref` (#4694). */
|
|
92
|
-
export const RELEASE_IMAGE_REF_FLOOR =
|
|
91
|
+
export const RELEASE_IMAGE_REF_FLOOR = "0.124.65";
|
|
93
92
|
|
|
94
93
|
/** One template of a target: a file a component's deploy reads, compiled for the target's environment. */
|
|
95
94
|
export interface ReleaseTemplate {
|
package/src/pr-forge.ts
CHANGED
|
@@ -307,7 +307,9 @@ const MERGE_REFUSED = new Set([405, 406, 409, 422]);
|
|
|
307
307
|
function ignoredStatus(ignore: readonly string[]): (name: string) => boolean {
|
|
308
308
|
const exact = new Set(ignore);
|
|
309
309
|
const under = ignore.filter((i) => i.endsWith("/"));
|
|
310
|
-
|
|
310
|
+
// An entry with `*` in it is a pattern, `*` standing for any run of characters, such as a pipeline job's status with the event after it (plywood#66).
|
|
311
|
+
const globs = ignore.filter((i) => i.includes("*")).map((i) => new RegExp(`^${i.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replaceAll("*", ".*")}$`));
|
|
312
|
+
return (name) => exact.has(name) || under.some((i) => name.startsWith(i)) || globs.some((g) => g.test(name));
|
|
311
313
|
}
|
|
312
314
|
|
|
313
315
|
/** A refused merge as a result, any other failure rethrown. */
|
package/src/pr-requires.test.ts
CHANGED
|
@@ -115,6 +115,16 @@ describe("github", () => {
|
|
|
115
115
|
expect((await f.prChecksPassed!(7, HEAD, ["plywood/preview"])).passed).toBe(false);
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
+
test("checks: an entry with * leaves out every status it matches, and only those", async () => {
|
|
119
|
+
const f = forge({
|
|
120
|
+
[`GET ${repo}/commits/${HEAD}/status`]: { statuses: [{ context: "chant-pr.shop.production / plan (pull_request)", state: "failure" }, { context: "ci/test", state: "success" }] },
|
|
121
|
+
[`GET ${repo}/commits/${HEAD}/check-runs`]: { check_runs: [] },
|
|
122
|
+
});
|
|
123
|
+
expect((await f.prChecksPassed!(7, HEAD, ["chant-pr.*.production / plan*"])).passed).toBe(true);
|
|
124
|
+
expect((await f.prChecksPassed!(7, HEAD, ["chant-pr.*.staging / plan*"])).passed).toBe(false);
|
|
125
|
+
expect((await f.prChecksPassed!(7, HEAD, ["chant-pr.shop.production / plan"])).passed).toBe(false);
|
|
126
|
+
});
|
|
127
|
+
|
|
118
128
|
test("checks: nothing reported is pending", async () => {
|
|
119
129
|
const f = forge({ [`GET ${repo}/commits/${HEAD}/status`]: { statuses: [] }, [`GET ${repo}/commits/${HEAD}/check-runs`]: { check_runs: [] } });
|
|
120
130
|
expect(await f.prChecksPassed!(7, HEAD)).toMatchObject({ passed: false, pending: true });
|
package/src/release-floors.ts
CHANGED