@intentius/chant 0.124.88 → 0.124.90
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/actor.d.ts +36 -1
- package/dist/actor.d.ts.map +1 -1
- package/dist/actor.js +39 -1
- package/dist/chant-install.d.ts.map +1 -1
- package/dist/chant-install.js +1 -2
- package/dist/ci-base.d.ts +30 -0
- package/dist/ci-base.d.ts.map +1 -0
- package/dist/ci-base.js +33 -0
- package/dist/ci-comment-commands.d.ts +193 -0
- package/dist/ci-comment-commands.d.ts.map +1 -0
- package/dist/ci-comment-commands.js +353 -0
- package/dist/ci-comment-replies.d.ts +40 -0
- package/dist/ci-comment-replies.d.ts.map +1 -0
- package/dist/ci-comment-replies.js +59 -0
- package/dist/ci-evidence-from-job.d.ts +25 -0
- package/dist/ci-evidence-from-job.d.ts.map +1 -1
- package/dist/ci-evidence-from-job.js +43 -2
- package/dist/ci-evidence-jobs.d.ts +30 -1
- package/dist/ci-evidence-jobs.d.ts.map +1 -1
- package/dist/ci-evidence-jobs.js +46 -3
- package/dist/ci-image.d.ts +21 -4
- package/dist/ci-image.d.ts.map +1 -1
- package/dist/ci-image.js +62 -10
- package/dist/ci-job-guard.d.ts +42 -45
- package/dist/ci-job-guard.d.ts.map +1 -1
- package/dist/ci-job-guard.js +206 -3
- package/dist/ci-note-commands.d.ts +104 -4
- package/dist/ci-note-commands.d.ts.map +1 -1
- package/dist/ci-note-commands.js +131 -38
- package/dist/ci-product-words.d.ts +42 -0
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +25 -0
- package/dist/ci-product.d.ts +72 -1
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +73 -6
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +29 -2
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +2 -1
- package/dist/cli/handlers/ci-check.d.ts +1 -1
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +17 -7
- package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
- package/dist/cli/handlers/ci-evidence.js +33 -7
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/components.js +3 -1
- package/dist/cli/handlers/generated-check.d.ts +8 -0
- package/dist/cli/handlers/generated-check.d.ts.map +1 -1
- package/dist/cli/handlers/generated-check.js +31 -1
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +121 -4
- package/dist/cli/handlers/pr-comment.d.ts +33 -0
- package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
- package/dist/cli/handlers/pr-comment.js +201 -0
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +6 -3
- package/dist/cli/handlers/pr-notes.d.ts.map +1 -1
- package/dist/cli/handlers/pr-notes.js +23 -1
- package/dist/cli/handlers/pr.d.ts +23 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +71 -23
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +2 -1
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +11 -2
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/handlers/run-wave.js +180 -4
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +2 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +41 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +31 -0
- package/dist/cli/registry.d.ts +19 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +2 -1
- package/dist/components/pr-checks.d.ts +97 -6
- package/dist/components/pr-checks.d.ts.map +1 -1
- package/dist/components/pr-checks.js +107 -13
- package/dist/components/pr-pipeline.d.ts +19 -14
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +7 -13
- package/dist/components/product-pipeline.d.ts +96 -3
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +120 -14
- package/dist/components/product-plan.d.ts +203 -6
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +250 -43
- package/dist/drift-record.d.ts +7 -0
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/drift-record.js +19 -0
- package/dist/floor-table.data.d.ts.map +1 -1
- package/dist/floor-table.data.js +63 -31
- package/dist/forge-check/contract.d.ts +11 -1
- package/dist/forge-check/contract.d.ts.map +1 -1
- package/dist/forge-check/contract.js +4 -1
- package/dist/forge-check/index.d.ts +2 -0
- package/dist/forge-check/index.d.ts.map +1 -1
- package/dist/forge-check/index.js +2 -0
- package/dist/gate-resume-run.d.ts +9 -1
- package/dist/gate-resume-run.d.ts.map +1 -1
- package/dist/gate-resume-run.js +26 -3
- package/dist/generated-check.d.ts +18 -4
- package/dist/generated-check.d.ts.map +1 -1
- package/dist/generated-check.js +37 -5
- package/dist/image-pins.d.ts +26 -0
- package/dist/image-pins.d.ts.map +1 -0
- package/dist/image-pins.js +19 -0
- package/dist/lexicon.d.ts +93 -4
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-applied.d.ts +9 -0
- package/dist/lifecycle/gate-applied.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +11 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +30 -3
- package/dist/lifecycle/publish-npm.d.ts +11 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +27 -1
- package/dist/lifecycle/reach-locks.d.ts +131 -0
- package/dist/lifecycle/reach-locks.d.ts.map +1 -0
- package/dist/lifecycle/reach-locks.js +118 -0
- package/dist/lifecycle/release-cut.d.ts +3 -1
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +15 -0
- package/dist/lifecycle/release-images.d.ts.map +1 -1
- package/dist/lifecycle/release-images.js +1 -2
- package/dist/notify-product.d.ts +12 -3
- package/dist/notify-product.d.ts.map +1 -1
- package/dist/notify-product.js +10 -6
- package/dist/op/activities/source-release.d.ts.map +1 -1
- package/dist/op/activities/source-release.js +2 -1
- package/dist/op/activities/source-rollback.d.ts.map +1 -1
- package/dist/op/activities/source-rollback.js +2 -1
- package/dist/op/apply-status.d.ts +84 -0
- package/dist/op/apply-status.d.ts.map +1 -0
- package/dist/op/apply-status.js +106 -0
- package/dist/op/before-merge-decide.d.ts +102 -0
- package/dist/op/before-merge-decide.d.ts.map +1 -0
- package/dist/op/before-merge-decide.js +142 -0
- package/dist/op/before-merge-done.d.ts +56 -0
- package/dist/op/before-merge-done.d.ts.map +1 -0
- package/dist/op/before-merge-done.js +69 -0
- package/dist/op/before-merge-store.d.ts +20 -0
- package/dist/op/before-merge-store.d.ts.map +1 -0
- package/dist/op/before-merge-store.js +48 -0
- package/dist/op/before-merge.d.ts +150 -0
- package/dist/op/before-merge.d.ts.map +1 -0
- package/dist/op/before-merge.js +207 -0
- package/dist/op/follow-on-run.d.ts +117 -0
- package/dist/op/follow-on-run.d.ts.map +1 -0
- package/dist/op/follow-on-run.js +154 -0
- package/dist/op/follow-on-store.d.ts +17 -0
- package/dist/op/follow-on-store.d.ts.map +1 -0
- package/dist/op/follow-on-store.js +54 -0
- package/dist/op/gate.d.ts +6 -0
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +10 -1
- package/dist/op/index.d.ts +5 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +2 -0
- package/dist/op/op-waves-after-plan.d.ts +13 -0
- package/dist/op/op-waves-after-plan.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.d.ts +10 -2
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.js +19 -5
- package/dist/op/op-waves-follow-on.d.ts +162 -0
- package/dist/op/op-waves-follow-on.d.ts.map +1 -0
- package/dist/op/op-waves-follow-on.js +355 -0
- package/dist/op/op-waves-render-spec.d.ts +100 -0
- package/dist/op/op-waves-render-spec.d.ts.map +1 -0
- package/dist/op/op-waves-render-spec.js +162 -0
- package/dist/op/op-waves-run.d.ts +148 -6
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +873 -100
- package/dist/op/op-waves-split.d.ts +122 -0
- package/dist/op/op-waves-split.d.ts.map +1 -0
- package/dist/op/op-waves-split.js +166 -0
- package/dist/op/op-waves.d.ts +24 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +18 -1
- package/dist/op/schedule-overdue.d.ts +15 -1
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +77 -5
- package/dist/op/stage-hooks.d.ts +36 -1
- package/dist/op/stage-hooks.d.ts.map +1 -1
- package/dist/op/stage-hooks.js +17 -3
- package/dist/op/wave-stop.d.ts +67 -0
- package/dist/op/wave-stop.d.ts.map +1 -0
- package/dist/op/wave-stop.js +129 -0
- package/dist/planned-files.d.ts +76 -0
- package/dist/planned-files.d.ts.map +1 -0
- package/dist/planned-files.js +108 -0
- package/dist/pr-forge-job.d.ts +22 -0
- package/dist/pr-forge-job.d.ts.map +1 -0
- package/dist/pr-forge-job.js +46 -0
- package/dist/pr-loop.d.ts +3 -6
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +4 -81
- package/dist/pr-plan-note.d.ts +97 -0
- package/dist/pr-plan-note.d.ts.map +1 -1
- package/dist/pr-plan-note.js +94 -1
- package/dist/pr-post.d.ts +28 -3
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +146 -13
- package/dist/pr-status.d.ts +16 -0
- package/dist/pr-status.d.ts.map +1 -0
- package/dist/pr-status.js +90 -0
- package/dist/ref-gate-init.d.ts +16 -2
- package/dist/ref-gate-init.d.ts.map +1 -1
- package/dist/ref-gate-init.js +24 -13
- package/dist/release-floors.d.ts +39 -1
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +63 -25
- package/dist/render-module.d.ts +15 -0
- package/dist/render-module.d.ts.map +1 -0
- package/dist/render-module.js +73 -0
- package/dist/state-migration.d.ts.map +1 -1
- package/dist/state-migration.js +1 -2
- package/dist/wave-blocked.d.ts +7 -1
- package/dist/wave-blocked.d.ts.map +1 -1
- package/dist/wave-blocked.js +7 -2
- package/dist/wave-runtime.mjs +366 -350
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +3 -2
- package/dist/workspace/release-train.d.ts.map +1 -1
- package/dist/workspace/release-train.js +2 -1
- package/dist/workspace/release-workflow.d.ts +4 -3
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +10 -7
- package/dist/workspace/trust/check-evidence-report.d.ts +7 -2
- package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence-report.js +15 -8
- package/dist/workspace/trust/ref-gate-cli.d.ts +10 -1
- package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate-cli.js +30 -10
- package/dist/workspace/workspace-run.d.ts.map +1 -1
- package/dist/workspace/workspace-run.js +2 -1
- package/package.json +1 -1
- package/src/actor.test.ts +68 -2
- package/src/actor.ts +61 -1
- package/src/chant-install.test.ts +2 -3
- package/src/chant-install.ts +1 -2
- package/src/ci-base.test.ts +41 -0
- package/src/ci-base.ts +43 -0
- package/src/ci-comment-commands.test.ts +439 -0
- package/src/ci-comment-commands.ts +428 -0
- package/src/ci-comment-replies.ts +78 -0
- package/src/ci-commit.test.ts +2 -3
- package/src/ci-evidence-from-job.test.ts +18 -0
- package/src/ci-evidence-from-job.ts +58 -2
- package/src/ci-evidence-jobs.ts +50 -5
- package/src/ci-image.test.ts +130 -10
- package/src/ci-image.ts +85 -12
- package/src/ci-job-guard.before-merge.test.ts +148 -0
- package/src/ci-job-guard.follow-on-record.test.ts +137 -0
- package/src/ci-job-guard.follow-on.test.ts +144 -0
- package/src/ci-job-guard.ts +221 -3
- package/src/ci-note-commands.test.ts +76 -1
- package/src/ci-note-commands.ts +198 -46
- package/src/ci-product-words.ts +59 -0
- package/src/ci-product.ts +90 -6
- package/src/cli/commands/build.test.ts +41 -0
- package/src/cli/commands/build.ts +27 -2
- package/src/cli/handlers/approve.ts +2 -1
- package/src/cli/handlers/ci-check.ts +19 -7
- package/src/cli/handlers/ci-evidence.ts +29 -8
- package/src/cli/handlers/components.ts +3 -1
- package/src/cli/handlers/generated-check.ts +31 -1
- package/src/cli/handlers/lock-reach.test.ts +103 -0
- package/src/cli/handlers/lock.ts +100 -4
- package/src/cli/handlers/pr-comment.ts +187 -0
- package/src/cli/handlers/pr-env.ts +6 -3
- package/src/cli/handlers/pr-notes.ts +30 -6
- package/src/cli/handlers/pr-record.test.ts +1 -1
- package/src/cli/handlers/pr.ts +64 -21
- package/src/cli/handlers/promote.ts +2 -1
- package/src/cli/handlers/release.e2e.test.ts +35 -0
- package/src/cli/handlers/release.ts +14 -2
- package/src/cli/handlers/run-wave.ts +170 -4
- package/src/cli/handlers/run.ts +2 -1
- package/src/cli/main.ts +41 -2
- package/src/cli/parse-args.ts +23 -0
- package/src/cli/registry.ts +19 -1
- package/src/components/auto-release.ts +2 -1
- package/src/components/pr-checks.ts +165 -17
- package/src/components/pr-pipeline.ts +22 -18
- package/src/components/product-pipeline.apply-status.test.ts +50 -0
- package/src/components/product-pipeline.ts +204 -17
- package/src/components/product-plan.test.ts +60 -4
- package/src/components/product-plan.ts +367 -50
- package/src/drift-record.test.ts +20 -0
- package/src/drift-record.ts +16 -0
- package/src/floor-table.data.ts +63 -31
- package/src/forge-check/contract.ts +12 -1
- package/src/forge-check/forge-check.test.ts +17 -0
- package/src/forge-check/index.ts +2 -0
- package/src/gate-resume-run.ts +27 -3
- package/src/generated-check.e2e.test.ts +21 -1
- package/src/generated-check.test.ts +66 -0
- package/src/generated-check.ts +51 -10
- package/src/image-pins.ts +31 -0
- package/src/lexicon.ts +89 -1
- package/src/lifecycle/gate-applied.ts +7 -0
- package/src/lifecycle/git.test.ts +48 -0
- package/src/lifecycle/git.ts +27 -4
- package/src/lifecycle/publish-npm.ts +31 -1
- package/src/lifecycle/reach-locks.test.ts +87 -0
- package/src/lifecycle/reach-locks.ts +169 -0
- package/src/lifecycle/release-cut.ts +17 -1
- package/src/lifecycle/release-images.test.ts +56 -0
- package/src/lifecycle/release-images.ts +1 -2
- package/src/notify-product.ts +19 -8
- package/src/op/activities/source-release.ts +2 -1
- package/src/op/activities/source-rollback.ts +2 -1
- package/src/op/apply-status.test.ts +83 -0
- package/src/op/apply-status.ts +132 -0
- package/src/op/before-merge-decide.ts +190 -0
- package/src/op/before-merge-done.ts +99 -0
- package/src/op/before-merge-store.ts +44 -0
- package/src/op/before-merge.test.ts +201 -0
- package/src/op/before-merge.ts +266 -0
- package/src/op/follow-on-run.ts +206 -0
- package/src/op/follow-on-store.ts +54 -0
- package/src/op/gate-resume.test.ts +27 -0
- package/src/op/gate.ts +16 -1
- package/src/op/index.ts +15 -0
- package/src/op/op-waves-after-plan.ts +13 -0
- package/src/op/op-waves-evidence-jobs.ts +21 -7
- package/src/op/op-waves-follow-on-record.test.ts +152 -0
- package/src/op/op-waves-follow-on.test.ts +247 -0
- package/src/op/op-waves-follow-on.ts +385 -0
- package/src/op/op-waves-notify-words.test.ts +18 -0
- package/src/op/op-waves-render-spec.test.ts +159 -0
- package/src/op/op-waves-render-spec.ts +171 -0
- package/src/op/op-waves-run.ts +973 -94
- package/src/op/op-waves-split-product.test.ts +288 -0
- package/src/op/op-waves-split-step.test.ts +298 -0
- package/src/op/op-waves-split.test.ts +196 -0
- package/src/op/op-waves-split.ts +189 -0
- package/src/op/op-waves.ts +31 -3
- package/src/op/schedule-overdue.test.ts +72 -1
- package/src/op/schedule-overdue.ts +84 -6
- package/src/op/stage-hooks.ts +52 -4
- package/src/op/wave-stop.test.ts +72 -0
- package/src/op/wave-stop.ts +139 -0
- package/src/planned-files.test.ts +80 -0
- package/src/planned-files.ts +134 -0
- package/src/pr-forge-job.test.ts +53 -0
- package/src/pr-forge-job.ts +46 -0
- package/src/pr-loop-narrowed.test.ts +2 -1
- package/src/pr-loop-words.test.ts +2 -1
- package/src/pr-loop.test.ts +1 -2
- package/src/pr-loop.ts +4 -80
- package/src/pr-plan-note.ts +155 -3
- package/src/pr-post-replan.test.ts +144 -0
- package/src/pr-post-subject.test.ts +230 -0
- package/src/pr-post.test.ts +2 -1
- package/src/pr-post.ts +151 -15
- package/src/pr-status.ts +91 -0
- package/src/ref-gate-init.ts +30 -11
- package/src/release-floors.ts +81 -25
- package/src/render-module.ts +73 -0
- package/src/state-migration-record.test.ts +2 -3
- package/src/state-migration.ts +1 -2
- package/src/wave-blocked.ts +9 -4
- package/src/workspace/ci-green-cli.ts +3 -2
- package/src/workspace/ci-green-workflow.test.ts +32 -1
- package/src/workspace/release-train.ts +2 -1
- package/src/workspace/release-workflow.test.ts +36 -5
- package/src/workspace/release-workflow.ts +10 -7
- package/src/workspace/trust/check-evidence-report.ts +15 -8
- package/src/workspace/trust/check-evidence.test.ts +5 -0
- package/src/workspace/trust/ref-gate-cli.ts +30 -8
- package/src/workspace/trust/ref-gate-pieces.test.ts +46 -1
- package/src/workspace/trust/ref-gate.test.ts +10 -0
- package/src/workspace/workspace-run.ts +2 -1
package/dist/pr-post.js
CHANGED
|
@@ -31,14 +31,15 @@
|
|
|
31
31
|
import { appendFileSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
32
32
|
import { tmpdir } from "node:os";
|
|
33
33
|
import { join } from "node:path";
|
|
34
|
-
import { prNoteMarker, prStatusContext,
|
|
34
|
+
import { prNoteMarker, prStatusContext, renderPrNote } from "./pr-loop.js";
|
|
35
|
+
import { prStatusDescription, prStatusState } from "./pr-status.js";
|
|
35
36
|
import { forgePrincipalOf } from "./pr-forge.js";
|
|
36
|
-
import { GITHUB_COMMENT_LIMIT, GITLAB_NOTE_LIMIT } from "./plan-summary.js";
|
|
37
|
+
import { fitNote, GITHUB_COMMENT_LIMIT, GITLAB_NOTE_LIMIT } from "./plan-summary.js";
|
|
37
38
|
import { activeProductWords, commentLine } from "./ci-product-words.js";
|
|
38
39
|
import { controlEdgeFactsFromEnv, remarkCrossStackEdges } from "./control/edges.js";
|
|
39
40
|
import { CHECK_EVIDENCE_FILE, checkEvidenceNoteLine, openEvidenceFor } from "./workspace/trust/check-evidence-report.js";
|
|
40
41
|
import { PLAN_RUN_RECORD_FILE, readPlanRunRecord } from "./pr-plan-record.js";
|
|
41
|
-
import { isPlanNote, planNoteMarker, PR_PLAN_NOTE_CONTRACT, PR_PLAN_NOTE_FILE, PRODUCT_MARKER_BODY, PRODUCT_MARKER_LIMIT, PRODUCT_MARKER_NAME, productMarkerLine, renderPlanNote } from "./pr-plan-note.js";
|
|
42
|
+
import { isPlanNote, PLAN_BODY_LIMIT, PLAN_SUBJECT_LIMIT, planNoteMarker, planSubjectProblem, PR_PLAN_NOTE_CONTRACT, PR_PLAN_NOTE_FILE, PRODUCT_MARKER_BODY, PRODUCT_MARKER_LIMIT, PRODUCT_MARKER_NAME, productMarkerLine, renderPlanNote, sinceLastLine } from "./pr-plan-note.js";
|
|
42
43
|
/** The plan report's file under the report directory. */
|
|
43
44
|
export const PR_PLAN_REPORT_FILE = "pr-plan.json";
|
|
44
45
|
const SHA = /^[0-9a-f]{40}$/;
|
|
@@ -80,7 +81,7 @@ export function readPlanReport(input) {
|
|
|
80
81
|
* The note for `report`, rendered here, with every `<!--` after the marker
|
|
81
82
|
* line written as `<!--`, so the note carries no hidden marker but its own.
|
|
82
83
|
*/
|
|
83
|
-
export function planNoteFor(report, forge, marker, baseTip) {
|
|
84
|
+
export function planNoteFor(report, forge, marker, baseTip, own) {
|
|
84
85
|
const note = renderPrNote(report, {
|
|
85
86
|
limit: forge.kind === "gitlab" ? GITLAB_NOTE_LIMIT : GITHUB_COMMENT_LIMIT,
|
|
86
87
|
approver: forgePrincipalOf(forge.kind, forge.host, "<your-login>"),
|
|
@@ -89,7 +90,43 @@ export function planNoteFor(report, forge, marker, baseTip) {
|
|
|
89
90
|
const rest = (at < 0 ? "" : note.slice(at + 1)).split("<!--").join("<!--");
|
|
90
91
|
// #4628: the tip line is written after the defusing, from the caller's sha, never the report's.
|
|
91
92
|
const tip = baseTip && SHA.test(baseTip) ? `${rest.endsWith("\n") ? "" : "\n"}${prNoteTipMarker(baseTip)}\n` : "";
|
|
92
|
-
|
|
93
|
+
// #4963: the product's own line, already checked, under chant's marker.
|
|
94
|
+
return `${marker}\n${own ? `${own}\n` : ""}${rest}${tip}`;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The product's hidden line for a report or a hand-off (#4931, #4963): from
|
|
98
|
+
* the pipeline's `productMarker` and the file's `marker`, checked against
|
|
99
|
+
* {@link PRODUCT_MARKER_BODY}. Undefined when either is missing or the
|
|
100
|
+
* marker is not plain words.
|
|
101
|
+
*/
|
|
102
|
+
function productLineOf(name, marker) {
|
|
103
|
+
if (name === undefined || !PRODUCT_MARKER_NAME.test(name) || typeof marker !== "string" || marker.length > PRODUCT_MARKER_LIMIT)
|
|
104
|
+
return undefined;
|
|
105
|
+
if (marker !== "" && !PRODUCT_MARKER_BODY.test(marker))
|
|
106
|
+
return undefined;
|
|
107
|
+
return productMarkerLine(name, marker);
|
|
108
|
+
}
|
|
109
|
+
/** The one plain word a re-plan was narrowed to (#4963), or undefined. */
|
|
110
|
+
function narrowedTo(input) {
|
|
111
|
+
const a = input.notAffected?.trim();
|
|
112
|
+
// #4984: a word that starts with `-` is a flag, never the argument a re-plan was narrowed to.
|
|
113
|
+
return a && /^[A-Za-z0-9_.\/@+=,:][A-Za-z0-9_.\/@+=,:-]*$/.test(a) ? a : undefined;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The reply for a re-plan narrowed to an argument the change does not
|
|
117
|
+
* reach (#4963), in place of the note and the status, as terragucci's
|
|
118
|
+
* plan-note job replied (plan-note.ts).
|
|
119
|
+
*/
|
|
120
|
+
async function replyNotAffected(input, argument, state, warnings) {
|
|
121
|
+
const description = `${argument} is not affected by this pull request, so nothing was planned.`;
|
|
122
|
+
try {
|
|
123
|
+
await input.forge.addComment(input.pr, `${activeProductWords().product}: ${description}`);
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
warnings.push(`could not reply on #${input.pr}: ${err instanceof Error ? err.message : String(err)}`);
|
|
127
|
+
}
|
|
128
|
+
const recorded = await keepRunRecord(input, warnings);
|
|
129
|
+
return { state, description: cut(description), noted: false, ...(recorded ? { recorded } : {}), warnings };
|
|
93
130
|
}
|
|
94
131
|
/** The hidden line a note carries with the target branch's commit it was posted against (#4628). */
|
|
95
132
|
export function prNoteTipMarker(sha) {
|
|
@@ -99,6 +136,55 @@ export function prNoteTipMarker(sha) {
|
|
|
99
136
|
export function prNoteStaleMarker(sha) {
|
|
100
137
|
return `<!-- chant-pr-stale:${sha} -->`;
|
|
101
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* The hidden line a note keeps its plan's subject in (#4972): base64url of
|
|
141
|
+
* the subject's JSON, `{ id }` alone when its parts would make the line
|
|
142
|
+
* longer than {@link PLAN_SUBJECT_LIMIT}. Undefined when even that is.
|
|
143
|
+
*/
|
|
144
|
+
export function prNoteSubjectMarker(subject) {
|
|
145
|
+
const line = (s) => `<!-- chant-pr-subject:${Buffer.from(JSON.stringify(s), "utf8").toString("base64url")} -->`;
|
|
146
|
+
const full = line(subject);
|
|
147
|
+
if (full.length <= PLAN_SUBJECT_LIMIT)
|
|
148
|
+
return full;
|
|
149
|
+
const bare = line({ id: subject.id });
|
|
150
|
+
return bare.length <= PLAN_SUBJECT_LIMIT ? bare : undefined;
|
|
151
|
+
}
|
|
152
|
+
const SUBJECT_LINE = /^<!-- chant-pr-subject:([A-Za-z0-9_-]+) -->$/m;
|
|
153
|
+
/**
|
|
154
|
+
* The subject a note kept (#4972), checked again: the line was chant's, but
|
|
155
|
+
* what it holds came from an earlier plan job. Undefined when there is none.
|
|
156
|
+
*/
|
|
157
|
+
export function subjectInNote(body) {
|
|
158
|
+
const m = SUBJECT_LINE.exec(body.replace(/\r\n/g, "\n"));
|
|
159
|
+
if (!m?.[1] || m[1].length > PLAN_SUBJECT_LIMIT)
|
|
160
|
+
return undefined;
|
|
161
|
+
try {
|
|
162
|
+
const s = JSON.parse(Buffer.from(m[1], "base64url").toString("utf8"));
|
|
163
|
+
return planSubjectProblem(s) === undefined ? s : undefined;
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The line saying what changed since the previous note (#4972): the
|
|
171
|
+
* previous note of the same environment and member is read with the job's
|
|
172
|
+
* token, and its kept subject compared with the hand-off's. Undefined when
|
|
173
|
+
* there is no previous note, it kept no subject, or the id is the same. A
|
|
174
|
+
* forge that refuses the read is a warning.
|
|
175
|
+
*/
|
|
176
|
+
async function sinceLastOf(input, subject, words, warnings) {
|
|
177
|
+
let found;
|
|
178
|
+
try {
|
|
179
|
+
found = await input.forge.findComment(input.pr, prNoteMarker(input.env, input.member));
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
warnings.push(`could not read the previous note on #${input.pr}, so the note does not say what changed since it: ${err instanceof Error ? err.message : String(err)}`);
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
const previous = found ? subjectInNote(found.body) : undefined;
|
|
186
|
+
return previous ? sinceLastLine(previous, subject, words ?? {}) : undefined;
|
|
187
|
+
}
|
|
102
188
|
const TIP_LINE = /<!-- chant-pr-tip:([0-9a-f]{40}) -->/;
|
|
103
189
|
const STALE_LINE = /<!-- chant-pr-stale:([0-9a-f]{40}) -->/;
|
|
104
190
|
const STALE_PREFIX = "> Stale: ";
|
|
@@ -135,6 +221,10 @@ export async function postPlanReport(input) {
|
|
|
135
221
|
}
|
|
136
222
|
else {
|
|
137
223
|
let report = read.report;
|
|
224
|
+
// #4963: a re-plan narrowed to an argument the change does not reach.
|
|
225
|
+
const narrowed = narrowedTo(input);
|
|
226
|
+
if (narrowed && report.status === "nothing" && !failedJob)
|
|
227
|
+
return replyNotAffected(input, narrowed, "success", warnings);
|
|
138
228
|
if (input.overdue) {
|
|
139
229
|
const { overdue: _forged, ...rest } = report;
|
|
140
230
|
const found = await input.overdue().catch(() => []);
|
|
@@ -149,8 +239,10 @@ export async function postPlanReport(input) {
|
|
|
149
239
|
state = prStatusState(report);
|
|
150
240
|
description = prStatusDescription(report);
|
|
151
241
|
// A member the change does not reach has nothing to say on the pull request (as pr-plan's own publish).
|
|
242
|
+
// #4963: the report's own `marker`, under the pipeline's productMarker, as a hand-off's.
|
|
243
|
+
const own = productLineOf((input.noteWords ?? noteWordsFromEnv())?.productMarker, read.report.marker);
|
|
152
244
|
if (!(input.member && report.status === "nothing" && !report.overdue?.length && !report.migrations?.length))
|
|
153
|
-
note = planNoteFor(report, input.forge, prNoteMarker(input.env, input.member), input.baseTip);
|
|
245
|
+
note = planNoteFor(report, input.forge, prNoteMarker(input.env, input.member), input.baseTip, own);
|
|
154
246
|
}
|
|
155
247
|
catch (err) {
|
|
156
248
|
refused = `the plan report does not render: ${err instanceof Error ? err.message : String(err)}`;
|
|
@@ -276,15 +368,43 @@ export function readPlanNoteHandoff(input) {
|
|
|
276
368
|
return { refused: `the plan note's state ${JSON.stringify(r.state)} is not success, failure or pending` };
|
|
277
369
|
if (typeof r.description !== "string")
|
|
278
370
|
return { refused: "the plan note has no description" };
|
|
279
|
-
|
|
371
|
+
// #4963: the product's own text in place of a plan note.
|
|
372
|
+
if (r.body !== undefined) {
|
|
373
|
+
if (r.note !== undefined)
|
|
374
|
+
return { refused: "the plan note gives both a note and a body; give one" };
|
|
375
|
+
if (typeof r.body !== "string" || r.body.length > PLAN_BODY_LIMIT)
|
|
376
|
+
return { refused: `the plan note's body is not text of at most ${PLAN_BODY_LIMIT} characters` };
|
|
377
|
+
}
|
|
378
|
+
else if (!isPlanNote(r.note) || r.note.head !== r.head || !Array.isArray(r.note.waves) || !Array.isArray(r.note.groups) || !Array.isArray(r.note.named)) {
|
|
280
379
|
return { refused: "the plan note's note is not a plan note for its head" };
|
|
281
380
|
}
|
|
282
381
|
// #4931: the product's hidden line is the change's too, so it holds only plain words.
|
|
283
382
|
if (r.marker !== undefined && (typeof r.marker !== "string" || r.marker.length > PRODUCT_MARKER_LIMIT || (r.marker !== "" && !PRODUCT_MARKER_BODY.test(r.marker)))) {
|
|
284
383
|
return { refused: `the plan note's marker is not words of letters, digits and _.,/@+=:- of at most ${PRODUCT_MARKER_LIMIT} characters` };
|
|
285
384
|
}
|
|
385
|
+
// #4972: the subject is kept in the note and said back in a later one, so it holds only plain words too.
|
|
386
|
+
const subjectProblem = r.subject !== undefined ? planSubjectProblem(r.subject) : undefined;
|
|
387
|
+
if (subjectProblem)
|
|
388
|
+
return { refused: `the plan note's subject ${subjectProblem}` };
|
|
286
389
|
return { handoff: doc };
|
|
287
390
|
}
|
|
391
|
+
/**
|
|
392
|
+
* The note for a hand-off of the product's own text (#4963): chant's
|
|
393
|
+
* marker, the product's line, the body with every `<!--` defused, the
|
|
394
|
+
* notices as quoted lines under it, the tip line, cut to the forge's limit.
|
|
395
|
+
*/
|
|
396
|
+
export function planBodyHandoffNote(handoff, forge, marker, noteWords, baseTip, notices = []) {
|
|
397
|
+
const limit = forge.kind === "gitlab" ? GITLAB_NOTE_LIMIT : GITHUB_COMMENT_LIMIT;
|
|
398
|
+
const line = productLineOf(noteWords?.productMarker, handoff.marker);
|
|
399
|
+
const head = `${marker}\n${line ? `${line}\n` : ""}`;
|
|
400
|
+
const said = notices.length > 0 ? `\n${notices.map((n) => `> ${n.split("<!--").join("<!--")}`).join("\n")}\n` : "";
|
|
401
|
+
const tip = baseTip && SHA.test(baseTip) ? `${prNoteTipMarker(baseTip)}\n` : "";
|
|
402
|
+
// #4972: the subject, kept for the next note to compare with.
|
|
403
|
+
const kept = handoff.subject ? prNoteSubjectMarker(handoff.subject) : undefined;
|
|
404
|
+
const subject = kept ? `${kept}\n` : "";
|
|
405
|
+
const body = handoff.body.split("<!--").join("<!--").replace(/\n*$/, "\n");
|
|
406
|
+
return `${head}${fitNote(body, { limit: Math.max(0, limit - head.length - said.length - tip.length - subject.length) })}${said}${tip}${subject}`;
|
|
407
|
+
}
|
|
288
408
|
/** The notices in the file `CHANT_PLAN_NOTE_NOTICES` names (#4931), one a line, or none when unset or unreadable. */
|
|
289
409
|
export function noticesFromEnv(env = process.env) {
|
|
290
410
|
const file = env.CHANT_PLAN_NOTE_NOTICES;
|
|
@@ -318,7 +438,10 @@ function noteWordsFromEnv() {
|
|
|
318
438
|
*/
|
|
319
439
|
export function planNoteHandoffNote(handoff, forge, marker, noteWords, baseTip) {
|
|
320
440
|
const words = activeProductWords();
|
|
321
|
-
|
|
441
|
+
// #4972: the subject, kept for the next note to compare with, within the forge's limit.
|
|
442
|
+
const kept = handoff.subject ? prNoteSubjectMarker(handoff.subject) : undefined;
|
|
443
|
+
const limit = (forge.kind === "gitlab" ? GITLAB_NOTE_LIMIT : GITHUB_COMMENT_LIMIT) - (kept ? kept.length + 1 : 0);
|
|
444
|
+
const rendered = renderPlanNote(handoff.note, { limit, words, ...(noteWords ? { note: noteWords } : {}) });
|
|
322
445
|
let body = rendered.split("<!--").join("<!--");
|
|
323
446
|
const n = handoff.note;
|
|
324
447
|
const previews = n.previews ?? [];
|
|
@@ -328,7 +451,8 @@ export function planNoteHandoffNote(handoff, forge, marker, noteWords, baseTip)
|
|
|
328
451
|
// #4931: the product's own line, from the pipeline's name and the hand-off's checked body, under chant's marker.
|
|
329
452
|
const name = noteWords?.productMarker;
|
|
330
453
|
const own = name !== undefined && PRODUCT_MARKER_NAME.test(name) && handoff.marker !== undefined ? `${productMarkerLine(name, handoff.marker)}\n` : "";
|
|
331
|
-
|
|
454
|
+
const subject = kept ? `${body.endsWith("\n") || tip ? "" : "\n"}${kept}\n` : "";
|
|
455
|
+
return `${marker}\n${own}${body}${tip}${subject}`;
|
|
332
456
|
}
|
|
333
457
|
/** {@link postPlanReport} for a product's plan note hand-off (#4799). */
|
|
334
458
|
async function postPlanNoteHandoff(input) {
|
|
@@ -348,14 +472,23 @@ async function postPlanNoteHandoff(input) {
|
|
|
348
472
|
else {
|
|
349
473
|
state = read.handoff.state;
|
|
350
474
|
description = read.handoff.description;
|
|
475
|
+
const h = read.handoff;
|
|
476
|
+
// #4963: a re-plan narrowed to an argument the change does not reach.
|
|
477
|
+
const narrowed = narrowedTo(input);
|
|
478
|
+
if (narrowed && "note" in h && h.note.nothing === true && !failedJob)
|
|
479
|
+
return replyNotAffected(input, narrowed, state, warnings);
|
|
351
480
|
// #4931: the overdue Ops (#4289), asked here with the job's token, and the note job's own notices, under the counts.
|
|
352
|
-
const given =
|
|
481
|
+
const given = "note" in h ? (h.note.notices ?? []) : [];
|
|
353
482
|
// An Op the product's own notices already call overdue is not said twice.
|
|
354
483
|
const overdue = input.overdue ? (await input.overdue().catch(() => [])).filter((o) => !given.some((g) => g.includes(`\`${o.op}\``) && g.includes("overdue"))).map((o) => o.message) : [];
|
|
355
|
-
const
|
|
356
|
-
|
|
484
|
+
const noteWords = input.noteWords ?? noteWordsFromEnv();
|
|
485
|
+
// #4972: what changed since the previous note, from the subject it kept, read here with the job's token.
|
|
486
|
+
const since = h.subject ? await sinceLastOf(input, h.subject, noteWords, warnings) : undefined;
|
|
487
|
+
const added = [...(since ? [since] : []), ...overdue, ...(input.notices ?? noticesFromEnv())].filter((n, i, all) => !given.includes(n) && all.indexOf(n) === i);
|
|
357
488
|
try {
|
|
358
|
-
note =
|
|
489
|
+
note = "note" in h
|
|
490
|
+
? planNoteHandoffNote(added.length > 0 ? { ...h, note: { ...h.note, notices: [...given, ...added] } } : h, input.forge, prNoteMarker(input.env, input.member), noteWords, input.baseTip)
|
|
491
|
+
: planBodyHandoffNote(h, input.forge, prNoteMarker(input.env, input.member), noteWords, input.baseTip, added);
|
|
359
492
|
}
|
|
360
493
|
catch (err) {
|
|
361
494
|
refused = `the plan note does not render: ${err instanceof Error ? err.message : String(err)}`;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pull-request loop's commit status (#3183): its description and its
|
|
3
|
+
* state, from the report `chant components pr-plan` and `pr-apply` write.
|
|
4
|
+
*
|
|
5
|
+
* They lived in `./pr-loop.ts` until #4966 moved them here, so the bundle
|
|
6
|
+
* a product builds from `pr-loop.ts` and `pr-forge.ts` (the report, the note
|
|
7
|
+
* and the forge clients, `pr-loop-bundle.test.ts`) keeps room under its
|
|
8
|
+
* ceiling. chant's own handlers post the status; no product reads these.
|
|
9
|
+
*/
|
|
10
|
+
import { type CiProductWords } from "./ci-product-words.js";
|
|
11
|
+
import { type PrReport } from "./pr-loop.js";
|
|
12
|
+
/** A commit status's description, at most 140 characters (GitHub's limit). */
|
|
13
|
+
export declare function prStatusDescription(report: PrReport, words?: CiProductWords): string;
|
|
14
|
+
/** The commit status state for a report: success, failure, or pending while it waits on approval. */
|
|
15
|
+
export declare function prStatusState(report: PrReport): "success" | "failure" | "pending";
|
|
16
|
+
//# sourceMappingURL=pr-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-status.d.ts","sourceRoot":"","sources":["../src/pr-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE7D,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAE,cAAqC,GAAG,MAAM,CAgE1G;AAED,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CASjF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pull-request loop's commit status (#3183): its description and its
|
|
3
|
+
* state, from the report `chant components pr-plan` and `pr-apply` write.
|
|
4
|
+
*
|
|
5
|
+
* They lived in `./pr-loop.ts` until #4966 moved them here, so the bundle
|
|
6
|
+
* a product builds from `pr-loop.ts` and `pr-forge.ts` (the report, the note
|
|
7
|
+
* and the forge clients, `pr-loop-bundle.test.ts`) keeps room under its
|
|
8
|
+
* ceiling. chant's own handlers post the status; no product reads these.
|
|
9
|
+
*/
|
|
10
|
+
import { activeProductWords } from "./ci-product-words.js";
|
|
11
|
+
import { memberHoleReasons } from "./pr-loop.js";
|
|
12
|
+
/** A commit status's description, at most 140 characters (GitHub's limit). */
|
|
13
|
+
export function prStatusDescription(report, words = activeProductWords()) {
|
|
14
|
+
const n = report.members.length;
|
|
15
|
+
const many = (k) => `${k} ${words.noun[k === 1 ? 0 : 1]}`;
|
|
16
|
+
const sum = report.members.reduce((acc, m) => ({ change: acc.change + m.counts.create + m.counts.update + m.counts.replace, destroy: acc.destroy + m.counts.delete + m.counts.replace }), { change: 0, destroy: 0 });
|
|
17
|
+
const digest = report.digest ? `; plan ${report.digest.replace(/^(?:jcs1-)?sha256:/, "").slice(0, 12)}` : "";
|
|
18
|
+
let text;
|
|
19
|
+
switch (report.status) {
|
|
20
|
+
case "nothing":
|
|
21
|
+
text = "nothing to plan";
|
|
22
|
+
break;
|
|
23
|
+
case "planned": {
|
|
24
|
+
const unknown = report.members.filter((m) => memberHoleReasons(report, m.member).length > 0).length;
|
|
25
|
+
// #4626: a narrowed plan says so in its status.
|
|
26
|
+
const narrowed = Object.values(report.narrowed ?? {}).filter((a) => a.length > 0).length;
|
|
27
|
+
text = `${many(n)}${narrowed > 0 ? ` (${narrowed} narrowed with --target)` : ""}: ${sum.change} to change, ${sum.destroy} to destroy or replace${unknown > 0 ? `, ${unknown} with holes` : ""}${digest}`;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
case "plan-failed":
|
|
31
|
+
text = `a ${words.noun[0]} failed to ${words.verbs.plan[0]}${digest}`;
|
|
32
|
+
break;
|
|
33
|
+
case "recorded":
|
|
34
|
+
text = `recorded ${many(n)}: ${report.approval.status === "approved" ? "the approved plan" : report.approval.status === "changed" ? "the plan differs from the approved one" : "no approval for this plan"}${digest}`;
|
|
35
|
+
break;
|
|
36
|
+
case "applied":
|
|
37
|
+
text = `${words.verbs.apply[1]} ${many(n)}${digest}`;
|
|
38
|
+
break;
|
|
39
|
+
case "wave-applied": {
|
|
40
|
+
const last = (report.waves ?? []).filter((w) => w.status === "applied").at(-1);
|
|
41
|
+
text = `applied wave ${last?.wave ?? "?"} of ${report.selection.waves.length}${last ? ` under ${last.approval === "pull-request" ? "the pull request's approval" : `${last.gate}`}` : ""}`;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
case "failed":
|
|
45
|
+
text = `apply failed for ${report.members.filter((m) => m.status === "failed").map((m) => m.member).join(", ")}`;
|
|
46
|
+
break;
|
|
47
|
+
case "waiting":
|
|
48
|
+
text = `waiting: ${report.members.filter((m) => m.status === "waiting").map((m) => m.member).join(", ")} planned again after an upstream applied, not approved yet`;
|
|
49
|
+
break;
|
|
50
|
+
case "refused": {
|
|
51
|
+
const waiting = report.waves?.find((w) => w.status === "waiting");
|
|
52
|
+
if (waiting && (report.refusal === "wave-not-approved" || report.refusal === "wave-plan-changed")) {
|
|
53
|
+
text = `wave ${waiting.wave} waits at ${waiting.gate}: ${report.refusal === "wave-plan-changed" ? "its plan changed after its approval" : "its plan moved, approve it"}`;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
if (report.refusal === "earlier-wave") {
|
|
57
|
+
text = "refused: an earlier wave has not applied";
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
if (report.refusal === "requires-unmet" || report.refusal === "before-merge-off") {
|
|
61
|
+
const unmet = (report.beforeMerge?.requires ?? []).filter((r) => !r.passed).map((r) => r.name);
|
|
62
|
+
text = report.refusal === "before-merge-off" ? "refused: this workspace does not apply before merge" : `refused: ${unmet.join(", ") || "a require"} unmet for an apply before merge`;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
if (report.refusal === "policy-denied" || report.refusal === "policy-error") {
|
|
66
|
+
text = report.refusal === "policy-denied" ? `refused: the policy denied the plan (${(report.policy?.rules ?? []).join(", ")})` : "refused: the policy could not be checked";
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
text = `refused: ${report.refusal === "plan-changed" ? "the plan changed after review" : report.refusal === "not-a-reviewer" ? "the approver has not approved the pull request" : report.refusal === "author-approved" ? "the approver wrote the change" : report.refusal === "no-pull-request" ? "no pull request merged this commit" : report.refusal === "locked" ? "another pull request holds a target lock" : "the plan is not approved"}`;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return text.length > 140 ? text.slice(0, 137) + "..." : text;
|
|
74
|
+
}
|
|
75
|
+
/** The commit status state for a report: success, failure, or pending while it waits on approval. */
|
|
76
|
+
export function prStatusState(report) {
|
|
77
|
+
// #4168 decision 1: a merge whose plan differs from the approved one is recorded, and its status fails.
|
|
78
|
+
if (report.status === "recorded")
|
|
79
|
+
return report.approval.status === "changed" ? "failure" : "success";
|
|
80
|
+
// #4294: a plan the policy denied, with no override, or one it could not check, fails at the plan stage as it would at the apply.
|
|
81
|
+
if (report.status === "planned" && report.policy && (report.policy.result === "error" || (report.policy.result === "denied" && !report.policy.override)))
|
|
82
|
+
return "failure";
|
|
83
|
+
if (report.status === "planned" || report.status === "applied" || report.status === "wave-applied" || report.status === "nothing")
|
|
84
|
+
return "success";
|
|
85
|
+
if (report.status === "refused" && (report.refusal === "not-approved" || report.refusal === "wave-not-approved"))
|
|
86
|
+
return "pending";
|
|
87
|
+
if (report.status === "waiting")
|
|
88
|
+
return "pending";
|
|
89
|
+
return "failure";
|
|
90
|
+
}
|
package/dist/ref-gate-init.d.ts
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* {@link refGateInitPlan} plans, and writes nothing, so a product folds the
|
|
7
7
|
* files into its own plan and keeps its dry run:
|
|
8
8
|
*
|
|
9
|
-
* - `.chant/trust.json` with a `refs` rule for the branch (#4867)
|
|
9
|
+
* - `.chant/trust.json` with a `refs` rule for the branch (#4867), whose
|
|
10
|
+
* `plan` and `policy` are each target's with `targets` (#4978): created
|
|
10
11
|
* with `"schema": 1` when there is none, the rule added in place when the
|
|
11
12
|
* file has no rule for the branch, left as it is when it has one or does
|
|
12
13
|
* not parse.
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
*
|
|
22
23
|
* {@link writeRefGateInit} writes the planned files, the hook executable.
|
|
23
24
|
*/
|
|
24
|
-
export { REF_GATE_PIECES_FLOOR } from "./release-floors.js";
|
|
25
|
+
export { REF_GATE_PIECES_FLOOR, TARGET_SIGNED_CHECKS_FLOOR } from "./release-floors.js";
|
|
25
26
|
/** One check the rule requires evidence for, as `refs[].checks[]` holds it. */
|
|
26
27
|
export interface RefGateInitCheck {
|
|
27
28
|
check: string;
|
|
@@ -35,6 +36,13 @@ export interface RefGateInitOptions {
|
|
|
35
36
|
branch?: string;
|
|
36
37
|
/** The checks an update of the branch needs current evidence for. At least one. */
|
|
37
38
|
checks: readonly RefGateInitCheck[];
|
|
39
|
+
/**
|
|
40
|
+
* The product plan's targets (#4978), as `productPlan.targets` names them.
|
|
41
|
+
* A target's note job signs `plan:<target>` and `policy:<target>`, so with
|
|
42
|
+
* targets a check named `plan` or `policy` stands for each target's, with
|
|
43
|
+
* the same action and command, in the order the targets are given.
|
|
44
|
+
*/
|
|
45
|
+
targets?: readonly string[];
|
|
38
46
|
/** The commit status the gate's status job sets. Default `chant/ref-gate`, which the rule then leaves out. */
|
|
39
47
|
status?: string;
|
|
40
48
|
/** Write the `pre-push` hook in this checkout. Default true. */
|
|
@@ -65,6 +73,12 @@ export interface RefGateInitPlan {
|
|
|
65
73
|
export declare class RefGateInitError extends Error {
|
|
66
74
|
constructor(message: string);
|
|
67
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* The rule's checks (#4978): with `targets`, `plan` and `policy` become each
|
|
78
|
+
* target's `plan:<target>` and `policy:<target>` (`targetEvidenceCheck`),
|
|
79
|
+
* which is what a product plan with targets signs.
|
|
80
|
+
*/
|
|
81
|
+
export declare function refGateInitChecks(checks: readonly RefGateInitCheck[], targets?: readonly string[]): RefGateInitCheck[];
|
|
68
82
|
/**
|
|
69
83
|
* Plan the ref gate's init pieces for the checkout `repo` (#4913). Writes
|
|
70
84
|
* nothing. Throws a {@link RefGateInitError} for options no rule can hold,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref-gate-init.d.ts","sourceRoot":"","sources":["../src/ref-gate-init.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ref-gate-init.d.ts","sourceRoot":"","sources":["../src/ref-gate-init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAaH,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAErF,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACpC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,8GAA8G;IAC9G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sJAAsJ;IACtJ,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,mEAAmE;AACnE,MAAM,WAAW,eAAe;IAC9B,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,wEAAwE;IACxE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAYD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,EAAE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAGtH;AAWD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,eAAe,CAuEvF;AAED,gHAAgH;AAChH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG,IAAI,CAG3E"}
|
package/dist/ref-gate-init.js
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* {@link refGateInitPlan} plans, and writes nothing, so a product folds the
|
|
7
7
|
* files into its own plan and keeps its dry run:
|
|
8
8
|
*
|
|
9
|
-
* - `.chant/trust.json` with a `refs` rule for the branch (#4867)
|
|
9
|
+
* - `.chant/trust.json` with a `refs` rule for the branch (#4867), whose
|
|
10
|
+
* `plan` and `policy` are each target's with `targets` (#4978): created
|
|
10
11
|
* with `"schema": 1` when there is none, the rule added in place when the
|
|
11
12
|
* file has no rule for the branch, left as it is when it has one or does
|
|
12
13
|
* not parse.
|
|
@@ -22,14 +23,16 @@
|
|
|
22
23
|
* {@link writeRefGateInit} writes the planned files, the hook executable.
|
|
23
24
|
*/
|
|
24
25
|
import { spawnSync } from "node:child_process";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
26
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
27
|
+
import { isAbsolute, join } from "node:path";
|
|
28
|
+
import { writePlannedFiles } from "./planned-files.js";
|
|
29
|
+
import { EVIDENCE_MEMBER_NAME, targetEvidenceCheck } from "./ci-evidence-jobs.js";
|
|
27
30
|
import { appendElement, setProperty } from "./workspace/json-edit.js";
|
|
28
31
|
import { parseJsonText } from "./workspace/jsonc.js";
|
|
29
32
|
import { REF_CHECK_NAME, TRUST_CONFIG_PATH, trustConfigSchema } from "./workspace/trust/policy.js";
|
|
30
33
|
import { refPatternRegExp, REF_GATE_STATUS } from "./workspace/trust/ref-gate.js";
|
|
31
34
|
import { REF_GATE_HOOK_MARK, refGateHook } from "./workspace/trust/ref-gate-cli.js";
|
|
32
|
-
export { REF_GATE_PIECES_FLOOR } from "./release-floors.js";
|
|
35
|
+
export { REF_GATE_PIECES_FLOOR, TARGET_SIGNED_CHECKS_FLOOR } from "./release-floors.js";
|
|
33
36
|
export class RefGateInitError extends Error {
|
|
34
37
|
constructor(message) {
|
|
35
38
|
super(message);
|
|
@@ -44,11 +47,21 @@ function planned(path, content, extra = {}) {
|
|
|
44
47
|
const before = existsSync(path) ? readFileSync(path, "utf-8") : undefined;
|
|
45
48
|
return { path, status: before === undefined ? "created" : before === content ? "unchanged" : "updated", content, ...extra };
|
|
46
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* The rule's checks (#4978): with `targets`, `plan` and `policy` become each
|
|
52
|
+
* target's `plan:<target>` and `policy:<target>` (`targetEvidenceCheck`),
|
|
53
|
+
* which is what a product plan with targets signs.
|
|
54
|
+
*/
|
|
55
|
+
export function refGateInitChecks(checks, targets) {
|
|
56
|
+
if (!targets || targets.length === 0)
|
|
57
|
+
return [...checks];
|
|
58
|
+
return checks.flatMap((c) => (c.check === "plan" || c.check === "policy" ? targets.map((t) => ({ ...c, check: targetEvidenceCheck(c.check, t) })) : [c]));
|
|
59
|
+
}
|
|
47
60
|
/** The `refs` rule for `ref`, with `action` and `status` only where they differ from the defaults. */
|
|
48
61
|
function ruleFor(ref, opts) {
|
|
49
62
|
return {
|
|
50
63
|
ref,
|
|
51
|
-
checks: opts.checks.map((c) => ({ check: c.check, ...(c.action === "warn" ? { action: "warn" } : {}), command: c.command })),
|
|
64
|
+
checks: refGateInitChecks(opts.checks, opts.targets).map((c) => ({ check: c.check, ...(c.action === "warn" ? { action: "warn" } : {}), command: c.command })),
|
|
52
65
|
...(opts.status && opts.status !== REF_GATE_STATUS ? { status: opts.status } : {}),
|
|
53
66
|
};
|
|
54
67
|
}
|
|
@@ -64,6 +77,10 @@ export function refGateInitPlan(repo, opts) {
|
|
|
64
77
|
throw new RefGateInitError(`the branch is one branch name, such as main, not ${JSON.stringify(branch)}`);
|
|
65
78
|
if (opts.checks.length === 0)
|
|
66
79
|
throw new RefGateInitError("the ref gate's rule needs at least one check");
|
|
80
|
+
for (const t of opts.targets ?? []) {
|
|
81
|
+
if (!EVIDENCE_MEMBER_NAME.test(t))
|
|
82
|
+
throw new RefGateInitError(`${JSON.stringify(t)} is not a product plan target's name: letters, digits, - and _`);
|
|
83
|
+
}
|
|
67
84
|
for (const c of opts.checks) {
|
|
68
85
|
if (!REF_CHECK_NAME.test(c.check))
|
|
69
86
|
throw new RefGateInitError(`${JSON.stringify(c.check)} is not a check name: letters, digits, . _ : -`);
|
|
@@ -133,12 +150,6 @@ export function refGateInitPlan(repo, opts) {
|
|
|
133
150
|
}
|
|
134
151
|
/** Write the files of a plan, each directory made and the hook executable. An unchanged file is not touched. */
|
|
135
152
|
export function writeRefGateInit(plan) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
continue;
|
|
139
|
-
mkdirSync(dirname(f.path), { recursive: true });
|
|
140
|
-
writeFileSync(f.path, f.content);
|
|
141
|
-
if (f.mode !== undefined)
|
|
142
|
-
chmodSync(f.path, f.mode);
|
|
143
|
-
}
|
|
153
|
+
// #4966: chant's one planned-file writer.
|
|
154
|
+
writePlannedFiles(plan.files);
|
|
144
155
|
}
|
package/dist/release-floors.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* this constant to the next patch (#4501). The check fails while a floor
|
|
20
20
|
* still names this constant after its version shipped.
|
|
21
21
|
*/
|
|
22
|
-
export declare const NEXT_RELEASE = "0.124.
|
|
22
|
+
export declare const NEXT_RELEASE = "0.124.90";
|
|
23
23
|
/** The first chant with `chant dev local` and `chant dev bundle-check`, `@intentius/chant/local-chant` and `@intentius/chant/bundle-check` (`chantRuntimeTarget`, `chantExternalPlugin`, `checkBundle`): a product built against a chant checkout, and its bundle checked, without its own scripts (#4787). */
|
|
24
24
|
export declare const LOCAL_CHANT_FLOOR = "0.124.86";
|
|
25
25
|
/** The first chant with `chant workspace ref-gate` (pre-receive, pre-push, check, status, attach, install) and `refs` in `.chant/trust.json`, the checks a ref update needs evidence for (#4867). */
|
|
@@ -32,6 +32,8 @@ export declare const TERRAFORM_APPLY_COMMAND_HOOK_FLOOR = "0.124.86";
|
|
|
32
32
|
export declare const TERRAFORM_ENGINE_TIMINGS_FLOOR = "0.124.88";
|
|
33
33
|
/** The first chant whose terraform lexicon finds live roots and estates (`live-roots`), places a Terragrunt unit (`terragruntUnitPlace`), reads a state migration's history and revert from its finished lines (`migration-history`), and runs the binary without the forge's tokens (`tokenlessBinaryExec`, `engineEnv`) (#4910). */
|
|
34
34
|
export declare const TERRAFORM_ROOT_HELPERS_FLOOR = "0.124.88";
|
|
35
|
+
/** The first chant whose terraform lexicon has one runner of the engine for a product (`engineRunner` in `engine-runner`: a hooked `exec`, `execSync`, `terragrunt` and the tokenless `script`), traces each engine command (`commandTrace`, `commandTraceEnv`), sends each Terragrunt unit's plan through `planTerragruntWave({ onCommand })`, and resolves a live root's record store (`liveRecordStore`, `writtenRecordStore`, `rootBackendAttrs` in `live-roots`) (#4954). */
|
|
36
|
+
export declare const TERRAFORM_ENGINE_RUNNER_FLOOR = "0.124.89";
|
|
35
37
|
/** The first chant with `@intentius/chant/forge-flags` (`forgeTargetWith`, `forgeTargetFromFlags`, `apiBaseOf`), `@intentius/chant/chant-install` (`bundledChant`, `chantArgv`, `installChantResolveFallback`) and `noteLimit` and `fitNote` in `@intentius/chant/plan-summary` (#4800). */
|
|
36
38
|
export declare const PRODUCT_HELPERS_FLOOR = "0.124.86";
|
|
37
39
|
/** The first chant with `@intentius/chant/ci-image`: `productImageStages`, `productImageDockerfile` and `derivedImageDockerfile` for a product's CI image, and `ciToolFetchScript`, `ciToolInstallLine` and `installCiTool`, the digest-checked engine installs, with the terraform lexicon's `choudoufuInstallLine` checked the same way (#4784). */
|
|
@@ -126,4 +128,40 @@ export declare const CHECK_SUMMARY_FLOOR = "0.124.88";
|
|
|
126
128
|
export declare const REF_GATE_STATUS_JOB_FLOOR = "0.124.88";
|
|
127
129
|
/** The first chant with `@intentius/chant/ref-gate-rules` (`refGateRulesAt`), `require` in `checkPrRequires`, `refGateStatus` in `pipelineContract` and `ci forge-check --ref-gate-status`, `@intentius/chant/ref-gate-init` (`refGateInitPlan`, `writeRefGateInit`), and a pre-receive refusal that prints the command recording the override request (#4913). */
|
|
128
130
|
export declare const REF_GATE_PIECES_FLOOR = "0.124.88";
|
|
131
|
+
/** The first chant whose `chant release cut --yes` pushes `chant/lifecycle` again when the remote refuses it, and exits non-zero untagged (`release-record-not-pushed`) when the release record never lands, so the release workflow does not push the tag (#4965). */
|
|
132
|
+
export declare const RELEASE_CUT_RECORD_FLOOR = "0.124.89";
|
|
133
|
+
/** The first chant whose release cut refuses, before it records or tags, a release whose npm publish target would carry an image archive (`publish-npm-carries-image`), and whose GitLab release workflow runs the binfmt image by digest from `IMAGE_PINS` (#4941). */
|
|
134
|
+
export declare const RELEASE_CUT_CARRIES_IMAGE_FLOOR = "0.124.89";
|
|
135
|
+
/** The first chant whose `ciToolFetchScript` and `ciToolInstallLine` take `download: "node"`, a fetch and unzip with node for an image with no curl or unzip, whose `CI_TOOL_SHA256` records just 1.36.0 and act 0.2.89 and checks them against their releases' checksums files, and whose overdue check deepens a shallow checkout before it dates a pipeline file (#4952). */
|
|
136
|
+
export declare const CI_TOOL_NODE_DOWNLOAD_FLOOR = "0.124.89";
|
|
137
|
+
/** The first chant whose `chant build -o <dir>/` writes a build's additional files (a docker project's Dockerfiles) into the directory with no primary file, whose `chantGenerated` renders take a `module` and its `export` (a `{ path: text }` object or a function returning one) and `chant dev render <module> <export>` writes them in place, and whose `chant ci workflow` and `chant release workflow` write into `chant dev generated-check`'s render tree with no `--output` (#4950). */
|
|
138
|
+
export declare const RENDER_KINDS_FLOOR = "0.124.89";
|
|
139
|
+
/** The first chant whose sql lexicon's `chant lifecycle diff --live` addresses a table's columns by name (`columns[#country].default.expr`), compares a ClickHouse table's column order as `columnOrder`, and reports a column the server has and the declaration does not as pending, and whose `lexiconDriftRecords` counts a deep read's pending changes (that column, a ClickHouse or Postgres privilege granted by hand) as drift (#4944). */
|
|
140
|
+
export declare const SQL_LIVE_COLUMNS_FLOOR = "0.124.89";
|
|
141
|
+
/** The first chant whose `driftNotifyFields` takes `stacks`, each member's drift records, and from them names the drifted members and computes the run's fingerprint (#4944). */
|
|
142
|
+
export declare const DRIFT_NOTIFY_STACKS_FLOOR = "0.124.89";
|
|
143
|
+
/** The first chant whose workspace member's pull request pipeline takes `evidence`, `checkJob` and `refGateStatus` (`chant build --pr-loop` in a member), signing the member's plan job as `plan:<member>` and `policy:<member>` (`ci evidence sign --member`, `memberEvidenceCheck`) and running the check job in the member's directory (#4964). */
|
|
144
|
+
export declare const MEMBER_SIGNED_CHECKS_FLOOR = "0.124.89";
|
|
145
|
+
/** The first chant whose `checkJob` takes `{ services, env, before, dir, args }` (`PrCheckJobOptions`: service containers, the check step's variables and lines, the report directory, the arguments after `--base`) and whose github, forgejo and gitlab lexicons render the check, check evidence and ref gate jobs for a product's own workflow (`productCheckJobs`, `forgejoProductCheckJobs`, `gitlabProductCheckJobs`) (#4964). */
|
|
146
|
+
export declare const PRODUCT_CHECK_JOBS_FLOOR = "0.124.89";
|
|
147
|
+
/** The first chant whose `checkJob` takes `artifacts: { paths, reports }` (`PrCheckArtifacts`), which GitLab's check job keeps beside its report as `artifacts:paths` and `artifacts:reports`, such as a lint hook's `codequality` report (#4988). */
|
|
148
|
+
export declare const CHECK_JOB_ARTIFACTS_FLOOR = "0.124.90";
|
|
149
|
+
/** The first chant whose GitLab Op waves pipeline with a runner key hands it to no wave job: each deciding wave's `<wave job>-evidence` job names the `chant-evidence` environment and signs `plan:<wave>` from the wave job (#4964). */
|
|
150
|
+
export declare const GITLAB_WAVE_KEY_SCOPE_FLOOR = "0.124.89";
|
|
151
|
+
/** The first chant with `actorOf` and `actorOrder` in `@intentius/chant/actor`: the actor fallback with `GITHUB_TRIGGERING_ACTOR` ahead of the forge's actor and git's `user.name` before the login, each place switched on or off by the caller (#4966). */
|
|
152
|
+
export declare const ACTOR_ORDER_FLOOR = "0.124.89";
|
|
153
|
+
/** The first chant with `@intentius/chant/ci-base` (`ciBaseRef`), the base a CI job measures a change from (the pull request's target branch, else the default branch for a push to another branch), and whose `chant ci check` defaults `--base` to it (#4966). */
|
|
154
|
+
export declare const CI_BASE_REF_FLOOR = "0.124.89";
|
|
155
|
+
/** The first chant with `@intentius/chant/planned-files` (`planFile`, `planRemoval`, `writePlannedFiles`, `staleGeneratedFiles`): an init's planned files with their modes, written or removed in one call, and the generated files a product no longer renders, found by their header (#4966). */
|
|
156
|
+
export declare const PLANNED_FILES_FLOOR = "0.124.89";
|
|
157
|
+
/** The first chant whose `pipelineContract` takes `jobs`, the jobs a product builds from its own config, beside or in place of `pipelines`, so a product's forge check gets the required statuses and `refGateStatus` from chant (#4966). */
|
|
158
|
+
export declare const FORGE_CHECK_OWN_JOBS_FLOOR = "0.124.89";
|
|
159
|
+
/** The first chant whose `chant components pr-apply --before-merge` waits for the ref gate's status: the status the policy at base sets for the target branch is passed as `require` to the `checks` require (#4966). */
|
|
160
|
+
export declare const BEFORE_MERGE_REF_GATE_FLOOR = "0.124.89";
|
|
161
|
+
/** The first chant whose product plan with `targets` and `evidence` signs each target's plan job as `plan:<target>` and `policy:<target>` (`ci evidence sign --member <target>`, `targetEvidenceCheck`, `productPlanEvidenceChecks`), and whose `refGateInitPlan` takes `targets` and names those checks in the `refs` rule (#4978). */
|
|
162
|
+
export declare const TARGET_SIGNED_CHECKS_FLOOR = "0.124.89";
|
|
163
|
+
/** The first chant whose Op waves generators take `renderSpec` (the wave jobs run `chant run wave --render-spec`, and `CHANT_WAVES_SPEC_COMMAND` names the product command that prints the spec at the commit in `CHANT_WAVES_SPEC_AT`), so a product whose spec is built from its config at base renders its wave jobs, policy step, evidence job and cloud trade through chant (#4982). */
|
|
164
|
+
export declare const RUNTIME_WAVES_SPEC_FLOOR = "0.124.89";
|
|
165
|
+
/** The first chant whose `chant run resume` (`resumeGateRun`) on GitLab retries a wave job's `<wave job>-evidence` with the wave job when the evidence job already ran, and whose `ci evidence sign --from-job` waits for a job it reads to finish, so a resumed wave's evidence job signs from the new try (#4978). */
|
|
166
|
+
export declare const GITLAB_WAVE_EVIDENCE_RETRY_FLOOR = "0.124.89";
|
|
129
167
|
//# sourceMappingURL=release-floors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-floors.d.ts","sourceRoot":"","sources":["../src/release-floors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,YAAY,aAAa,C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