@catladder/cli 0.0.0-next-dc12de13 → 0.0.0-next-3675a1db

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.
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getReleaseGateJobNames = void 0;
4
+ /**
5
+ * the jobs the queued-release executor must `needs:` so that it runs
6
+ * exactly when the whole main-branch pipeline succeeded.
7
+ *
8
+ * `needs:` is transitive: a job that another automatic job needs is
9
+ * already awaited through that job, and a failed ancestor skips its
10
+ * descendants (and with them the executor) either way. The executor
11
+ * therefore only needs the SINKS of the auto-job graph — the jobs no
12
+ * other automatic job depends on (deploy/verify tips, terminal
13
+ * test/lint/audit). This keeps the needs list far below gitlab's
14
+ * 50-entry cap even on pipelines with many components.
15
+ *
16
+ * INVARIANT (do not weaken): every automatic job is an ancestor of the
17
+ * returned set. This holds for ANY graph shape, because the sinks are
18
+ * recomputed from the actual needs edges on every generation — if e.g.
19
+ * deploys ever stop needing the test jobs, the test jobs become sinks
20
+ * and re-enter the executor's needs by themselves. Only needs FROM
21
+ * automatic jobs count: a job consumed solely by manual jobs is a sink
22
+ * too, and keeps gating the release directly.
23
+ */
24
+ const getReleaseGateJobNames = (autoJobs) => {
25
+ const neededByAnAutoJob = new Set(autoJobs.flatMap(({ gitlabJob }) => {
26
+ var _a;
27
+ return ((_a = gitlabJob.needs) !== null && _a !== void 0 ? _a : []).map((need) => typeof need === "string" ? need : need.job);
28
+ }));
29
+ return [...new Set(autoJobs.map(({ name }) => name))].filter((name) => !neededByAnAutoJob.has(name));
30
+ };
31
+ exports.getReleaseGateJobNames = getReleaseGateJobNames;
32
+ //# sourceMappingURL=releaseGateJobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseGateJobs.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/gitlab/releaseGateJobs.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,sBAAsB,GAAG,CACpC,QAAyE,EAC/D,EAAE;IACZ,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;;QACjC,OAAA,CAAC,MAAA,SAAS,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACnC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAC3C,CAAA;KAAA,CACF,CACF,CAAC;IACF,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAC1D,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CACvC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,sBAAsB,0BAajC"}
@@ -255,6 +255,21 @@ now-wrong `gitRemote`, regenerate once more, and finish with
255
255
 
256
256
  ## After the cut-over
257
257
 
258
+ - **Set up merge gating — GitHub has none by default.** On GitLab,
259
+ "merge when pipeline succeeds" is built in; on a fresh GitHub repo a
260
+ PR is mergeable the moment it opens, checks still running, and the
261
+ auto-merge button does not even appear. Two one-time settings fix it:
262
+ 1. Settings → General → Pull Requests → enable **"Allow auto-merge"**
263
+ (and "Automatically delete head branches" while there)
264
+ 2. a branch protection rule on the default branch requiring the
265
+ **`catladder ✅`** status check — the aggregate job catladder
266
+ generates into the review workflow precisely for this. Require
267
+ only this one context, never individual job names: those change
268
+ with every component add/rename, and a stale required name blocks
269
+ the renaming PR forever ("Expected — waiting for status").
270
+ Consider leaving "enforce for administrators" off: this repo's CI is
271
+ generated, so if generation itself ever breaks, the admin bypass is
272
+ what lets the fix merge.
258
273
  - Tell the team where the pipeline lives now and how manual actions
259
274
  work there (on GitHub, manual jobs are dispatch workflows in the
260
275
  Actions sidebar — `🚀 catladder create release`, `▶️ catladder deploy`,