@theholocron/astromech 5.0.0-alpha.454 → 5.0.0-alpha.456
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/README.md +3 -3
- package/dist/config/index.d.mts +1 -1
- package/dist/config/index.mjs +1 -1
- package/dist/{editorconfig-checker-B-hWWYHk.mjs → editorconfig-checker-C9_6QdcT.mjs} +1 -15
- package/dist/index.d.mts +21 -22
- package/dist/index.mjs +42 -61
- package/dist/lint/index.d.mts +10 -19
- package/dist/lint/index.mjs +24 -21
- package/dist/{load-De6a7t-D.mjs → load-PgZbUPyW.mjs} +0 -1
- package/dist/{schema.type-DRfLKO70.d.mts → schema.type-Cg6I1dCc.d.mts} +7 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -155,7 +155,7 @@ const astromech = createAstromech({ cwd, config, orgContext: { org, domain } });
|
|
|
155
155
|
|
|
156
156
|
astromech.thinCallers(); // Map<"<name>.yml", yaml> — one per templated, ci-enabled task
|
|
157
157
|
astromech.packageScripts(); // single package: { holocron: "holocron", "test:unit": "holocron run test unit --", … }; workspace: { "test:unit": "turbo run test:unit", … }
|
|
158
|
-
astromech.requiredChecks(true); // ["ci / Required checks",
|
|
158
|
+
astromech.requiredChecks(true); // ["ci / Required checks", DCO_CHECK] — branch-protection contexts (false: DCO_CHECK, then the per-task contexts, then extras); DCO_CHECK is Sentinel's `validate:dco / Run Developer Certificate of Origin`
|
|
159
159
|
astromech.aggregateCaller(); // the thin caller of the `ci` aggregate check, or null when nothing is required
|
|
160
160
|
astromech.ci({ scope: "required" }); // CiReport — run the gating checks locally, in CI order
|
|
161
161
|
```
|
|
@@ -205,7 +205,7 @@ to flat ids is what moves its keys, and the package scripts with them (`taskKey(
|
|
|
205
205
|
### Required checks
|
|
206
206
|
|
|
207
207
|
`requiredChecks(aggregate)` is the branch-protection required-status-check list. With the `ci` aggregate (the repo
|
|
208
|
-
contains it, see below) it is `["ci / Required checks",
|
|
208
|
+
contains it, see below) it is `["ci / Required checks", DCO_CHECK]`. Without it, it is `DCO_CHECK`, then every `{ required: true }` task's check
|
|
209
209
|
context, ordered by `CI_ORDER`, then `config.extraRequiredChecks` (codecov gates, …), de-duplicated. Most tasks are
|
|
210
210
|
single always-run jobs now, so their context
|
|
211
211
|
names that job directly (`"typecheck / Run tsc --noEmit"`) — the `… /
|
|
@@ -283,7 +283,7 @@ config surface don't pull `@commitlint/*` in:
|
|
|
283
283
|
checks skip exactly what each repo's own CI skips.
|
|
284
284
|
|
|
285
285
|
The root entry also exports the config-file generators `holocron setup`
|
|
286
|
-
writes (`createEditorconfig`, `
|
|
286
|
+
writes (`createEditorconfig`, `createPrePush`, …) and
|
|
287
287
|
`createHeader`.
|
|
288
288
|
|
|
289
289
|
## Repo validation — `@theholocron/astromech/repo-validation`
|
package/dist/config/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* zero-runtime-dep entry so `astromech.config.ts` and `@theholocron/cli`
|
|
4
4
|
* can import it without pulling the task runner.
|
|
5
5
|
*/
|
|
6
|
-
import { n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema.type-
|
|
6
|
+
import { n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema.type-Cg6I1dCc.mjs";
|
|
7
7
|
import { Loaded } from "@theholocron/datapad";
|
|
8
8
|
/**
|
|
9
9
|
* The `tasks` config shape — the single manifest of what a repo runs.
|
package/dist/config/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-
|
|
1
|
+
import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-PgZbUPyW.mjs";
|
|
2
2
|
import { createDefineConfig, mergeLayers } from "@theholocron/datapad";
|
|
3
3
|
// src/config/define/define.ts
|
|
4
4
|
/**
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
// src/templates/configs/alexjs/alexrc.json
|
|
2
|
-
var alexrc_default = { allow: [
|
|
3
|
-
"dead",
|
|
4
|
-
"execute",
|
|
5
|
-
"execution",
|
|
6
|
-
"executes",
|
|
7
|
-
"failure",
|
|
8
|
-
"failures",
|
|
9
|
-
"hook",
|
|
10
|
-
"hooks",
|
|
11
|
-
"host-hostess",
|
|
12
|
-
"husky",
|
|
13
|
-
"period"
|
|
14
|
-
] };
|
|
15
1
|
// src/templates/configs/editorconfig-checker/editorconfig-checker.json
|
|
16
2
|
var editorconfig_checker_default = {
|
|
17
3
|
Verbose: false,
|
|
@@ -37,4 +23,4 @@ var editorconfig_checker_default = {
|
|
|
37
23
|
"MaxLineLength": false
|
|
38
24
|
}
|
|
39
25
|
};
|
|
40
|
-
export {
|
|
26
|
+
export { editorconfig_checker_default as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* The config surface (`defineConfig`, `TasksConfig`, `loadTasksConfig`)
|
|
21
21
|
* lives in the zero-runtime-dep `@theholocron/astromech/config` subpath.
|
|
22
22
|
*/
|
|
23
|
-
import { r as TasksConfig } from "./schema.type-
|
|
23
|
+
import { r as TasksConfig } from "./schema.type-Cg6I1dCc.mjs";
|
|
24
24
|
/** A commit status a coverage provider reports on a pull request (names only), as `Coverage.statusContexts()` returns it. */
|
|
25
25
|
interface StatusContext {
|
|
26
26
|
/** The context GitHub shows, such as `codecov/patch`. */
|
|
@@ -163,8 +163,8 @@ export declare function readWorkspacePackages(repoRoot: string): WorkspacePackag
|
|
|
163
163
|
export declare const REUSABLE_WORKFLOWS: Record<string, string>;
|
|
164
164
|
/**
|
|
165
165
|
* The reusables a repo that hosts them keeps in its own `.github/workflows`, by id: the ones that only run when
|
|
166
|
-
* another workflow calls them. A reusable that is also started by an event or by hand (`tag`, `sync-dispatch
|
|
167
|
-
*
|
|
166
|
+
* another workflow calls them. A reusable that is also started by an event or by hand (`tag`, `sync-dispatch`)
|
|
167
|
+
* would become a live workflow of the hosting repo, and runs where it is dispatched, so
|
|
168
168
|
* it stays out (spec `tech-workflows-in-holocron`, #1216).
|
|
169
169
|
*/
|
|
170
170
|
export declare function hostedReusableWorkflows(): Map<string, string>;
|
|
@@ -307,6 +307,11 @@ export declare function deriveDeployPaths(raw: Record<string, unknown>): string[
|
|
|
307
307
|
* them for a reusable workflow.
|
|
308
308
|
*/
|
|
309
309
|
export declare const AGGREGATE_CHECK = "ci / Required checks";
|
|
310
|
+
/**
|
|
311
|
+
* The context of the DCO check: Sentinel's `validate:dco / Run Developer Certificate of Origin`. It replaced the probot DCO
|
|
312
|
+
* app's `DCO` (#1044). Required on its own, outside the aggregate.
|
|
313
|
+
*/
|
|
314
|
+
export declare const DCO_CHECK = "validate:dco / Run Developer Certificate of Origin";
|
|
310
315
|
/** Ordered, de-duplicated. */
|
|
311
316
|
export declare function requiredChecks(config: TasksConfig, aggregate: boolean, statusContexts?: readonly StatusContext[]): string[];
|
|
312
317
|
/** Where a `package.json` sits in the repo: the root (which holds the suite scripts) or any other package. */
|
|
@@ -565,8 +570,8 @@ interface TsconfigOptions {
|
|
|
565
570
|
/**
|
|
566
571
|
* A package-level `tsconfig.json` — the uniform shape confirmed across
|
|
567
572
|
* every package checked, parameterized only by the two fields that
|
|
568
|
-
* genuinely vary (`display`, `paths`). No scaffold/workflow header (
|
|
569
|
-
*
|
|
573
|
+
* genuinely vary (`display`, `paths`). No scaffold/workflow header (a strict-JSON
|
|
574
|
+
* Bucket B file, like `.editorconfig-checker.json` —
|
|
570
575
|
* JSON has no comment syntax to carry one, and TypeScript's own tolerance
|
|
571
576
|
* for JSONC comments in `tsconfig.json` isn't worth relying on for a file
|
|
572
577
|
* this thin).
|
|
@@ -1219,10 +1224,6 @@ export declare function idFromSource(path: string): string;
|
|
|
1219
1224
|
* is why the grouped sources of `ci/workflows/` are flattened; {@link idFromSource} goes the other way.
|
|
1220
1225
|
*/
|
|
1221
1226
|
export declare function workflowFile(id: string): string;
|
|
1222
|
-
/** The `.alexrc.json` body: the org's inclusive-language allow-list. */
|
|
1223
|
-
declare function createRcConfig(): string;
|
|
1224
|
-
/** The `.alexignore` body. */
|
|
1225
|
-
declare function createIgnoreConfig(): string;
|
|
1226
1227
|
/**
|
|
1227
1228
|
* `.husky/commit-msg` — lints the commit message via `holocron run lint
|
|
1228
1229
|
* commit-msg` (holocron#789), the real programmatic replacement for
|
|
@@ -1233,8 +1234,6 @@ declare function createIgnoreConfig(): string;
|
|
|
1233
1234
|
* `pnpm exec holocron`; the source repo passes `node cli/cli/dist/cli.mjs`.
|
|
1234
1235
|
*/
|
|
1235
1236
|
declare function createConfig(holocronScript?: string): string;
|
|
1236
|
-
/** The `.github/dco.yml` body, which lets a maintainer remediate a missing sign-off with a follow-up commit. */
|
|
1237
|
-
declare function createConfig$1(): string;
|
|
1238
1237
|
/** What varies in the generated `.github/dependabot.yml`; the rest of the file is the same for every repo. */
|
|
1239
1238
|
interface DependabotConfigOptions {
|
|
1240
1239
|
/**
|
|
@@ -1255,11 +1254,11 @@ interface DependabotConfigOptions {
|
|
|
1255
1254
|
* `ignore` entry on the npm ecosystem, and `sources` are watched next to `/` (`.github/workflows`) by the
|
|
1256
1255
|
* github-actions one; with neither, the file is the shared body unchanged.
|
|
1257
1256
|
*/
|
|
1258
|
-
declare function createConfig$
|
|
1257
|
+
declare function createConfig$1({ ignore, sources }?: DependabotConfigOptions): string;
|
|
1259
1258
|
/** The `devmoji.config.cjs` body, which defers to `@theholocron/devmoji-config`. */
|
|
1260
|
-
declare function createConfig$
|
|
1259
|
+
declare function createConfig$2(): string;
|
|
1261
1260
|
/** The `.editorconfig` body, under the auto-generated header. */
|
|
1262
|
-
declare function createConfig$
|
|
1261
|
+
declare function createConfig$3(): string;
|
|
1263
1262
|
/**
|
|
1264
1263
|
* The generated `.editorconfig-checker.json`.
|
|
1265
1264
|
*
|
|
@@ -1271,9 +1270,9 @@ declare function createConfig$4(): string;
|
|
|
1271
1270
|
* options here (`Exclude`, `Disable`) are stable across releases, so pinning
|
|
1272
1271
|
* buys nothing.
|
|
1273
1272
|
*/
|
|
1274
|
-
declare function createConfig$
|
|
1273
|
+
declare function createConfig$4(): string;
|
|
1275
1274
|
/** The `.github/labeler.yml` body, which labels a pull request by its Conventional Commit type. */
|
|
1276
|
-
declare function createConfig$
|
|
1275
|
+
declare function createConfig$5(): string;
|
|
1277
1276
|
/**
|
|
1278
1277
|
* `.husky/pre-commit` — runs GitLeaks (scoped to staged changes) and
|
|
1279
1278
|
* lint-staged before every commit. Installed by `holocron setup` when hooks
|
|
@@ -1286,7 +1285,7 @@ declare function createConfig$6(): string;
|
|
|
1286
1285
|
* doc — every future commit is permanently blocked, regardless of what's
|
|
1287
1286
|
* actually staged.
|
|
1288
1287
|
*/
|
|
1289
|
-
declare function createConfig$
|
|
1288
|
+
declare function createConfig$6(): string;
|
|
1290
1289
|
/**
|
|
1291
1290
|
* `.husky/pre-push` — runs `holocron run ci` (the merge-gating checks, in CI order)
|
|
1292
1291
|
* before every push. Installed by `holocron setup` when hooks are enabled
|
|
@@ -1295,11 +1294,11 @@ declare function createConfig$7(): string;
|
|
|
1295
1294
|
* @param holocronScript - the command that invokes the CLI. Defaults to
|
|
1296
1295
|
* `pnpm exec holocron`; the source repo passes `node cli/cli/dist/cli.mjs`.
|
|
1297
1296
|
*/
|
|
1298
|
-
declare function createConfig$
|
|
1297
|
+
declare function createConfig$7(holocronScript?: string): string;
|
|
1299
1298
|
/** The `.husky/prepare-commit-msg` hook, a shell script under the auto-generated header. */
|
|
1300
|
-
declare function createConfig$
|
|
1299
|
+
declare function createConfig$8(): string;
|
|
1301
1300
|
/** The `.yamllint.yml` body, under the auto-generated header. */
|
|
1302
|
-
declare function createConfig$
|
|
1301
|
+
declare function createConfig$9(): string;
|
|
1303
1302
|
/** The `.yamlignore` body. */
|
|
1304
|
-
declare function createIgnoreConfig
|
|
1305
|
-
export { type AggregateChecks, type Astromech, type AstromechOptions, type CiJobReport, type CiOptions, type CiReport, type CreateHeaderOptions, type DependabotConfigOptions, type DeployOnReleaseOptions, type DeployOnReleaseReport, type DeployOnReleaseResult, type WorkspacePackage as DeployWorkspacePackage, type DocsCoverageMode, type ExecFn, type GroupJobReport, type GroupOptions, type GroupReport, type HeaderFunctions, type LegacyTarget, type LocalRunner, type MergedScripts, type OrgContext, type PackageRole, type PackageScriptProblem, type PlannedKind, type PlannedTask, type PreviewConfig, type RepoShape, type RunLogger, type RunOptions, type RunTaskInput, type RunTaskReport, type StatusContext, type TaskDef, type TaskGroup, type TaskScope, type TsconfigOptions, type WorkflowHeaderFormat, type WorkspacePackage$1 as WorkspacePackage,
|
|
1303
|
+
declare function createIgnoreConfig(): string;
|
|
1304
|
+
export { type AggregateChecks, type Astromech, type AstromechOptions, type CiJobReport, type CiOptions, type CiReport, type CreateHeaderOptions, type DependabotConfigOptions, type DeployOnReleaseOptions, type DeployOnReleaseReport, type DeployOnReleaseResult, type WorkspacePackage as DeployWorkspacePackage, type DocsCoverageMode, type ExecFn, type GroupJobReport, type GroupOptions, type GroupReport, type HeaderFunctions, type LegacyTarget, type LocalRunner, type MergedScripts, type OrgContext, type PackageRole, type PackageScriptProblem, type PlannedKind, type PlannedTask, type PreviewConfig, type RepoShape, type RunLogger, type RunOptions, type RunTaskInput, type RunTaskReport, type StatusContext, type TaskDef, type TaskGroup, type TaskScope, type TsconfigOptions, type WorkflowHeaderFormat, type WorkspacePackage$1 as WorkspacePackage, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createIgnoreConfig as createYamlignore, createConfig$9 as createYamllint };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as legacyName, c as CI_ORDER, i as resolveTaskName, l as TASKS, o as ownLegacyName, r as isTask, s as LEGACY_NAMES, t as loadTasksConfig, u as normalizeTaskEntry } from "./load-
|
|
2
|
-
import {
|
|
1
|
+
import { a as legacyName, c as CI_ORDER, i as resolveTaskName, l as TASKS, o as ownLegacyName, r as isTask, s as LEGACY_NAMES, t as loadTasksConfig, u as normalizeTaskEntry } from "./load-PgZbUPyW.mjs";
|
|
2
|
+
import { t as editorconfig_checker_default } from "./editorconfig-checker-C9_6QdcT.mjs";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import { dirname, join, relative } from "node:path";
|
|
5
5
|
import { addWorkspaceMember, dependencyNames, detectPackageManager, discoverWorkspacePackages, readPackageJsonSync } from "@theholocron/pkg-utils";
|
|
@@ -44,9 +44,8 @@ function describeTasks() {
|
|
|
44
44
|
return lines.join("\n");
|
|
45
45
|
}
|
|
46
46
|
// ../../ci/dist/index.mjs
|
|
47
|
-
var annotate_default$1 = "name: Review\n\n# ReviewDog is the annotation layer — posts inline PR diff annotations.\n# Runs on pull_request only: inline annotations require PR context,\n# and branch protection ensures all changes go through PRs anyway.\n# scan-secrets.yml / lint-data.yml\n# are the CI gates covering push + PR events. Gitleaks and YAML are\n# intentionally duplicated: those gate merges; ReviewDog surfaces exact\n# line annotations in the PR diff.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n\njobs:\n reviewdog:\n name: Post inline lint annotations\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: read\n pull-requests: write\n\n steps:\n - name: Checkout repository\n uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n with:\n fetch-depth: 0\n\n - name: Setup\n if: ${{ hashFiles('pnpm-lock.yaml') != '' }}\n uses: theholocron/.github/.github/actions/setup@main\n\n - name: Install ReviewDog\n uses: reviewdog/action-setup@d8a7baabd7f3e8544ee4dbde3ee41d0011c3a93f # v1\n with:\n reviewdog_version: latest\n\n # Detect which tools are relevant for this repo, excluding node_modules.\n # hashFiles('**/*') recurses into node_modules/.pnpm and produces false\n # positives for repos that don't own those file types.\n # -print -quit stops find after the first match without a pipe, avoiding\n # the SIGPIPE/pipefail exit-141 that find|head-1 triggers under\n # GitHub Actions' default bash --noprofile --norc -e -o pipefail mode.\n - name: Detect project features\n id: detect\n shell: bash\n run: |\n has() { find . -not -path '*/node_modules/*' -name \"$1\" -print -quit 2>/dev/null | grep -q .; }\n has_ext() { find . -not -path '*/node_modules/*' -name \"$1\" -print -quit 2>/dev/null | grep -q .; }\n { { has 'eslint.config.js' || has 'eslint.config.mjs' || has 'eslint.config.cjs' || \\\n has 'eslint.config.ts' || has '.eslintrc' || has '.eslintrc.js' || \\\n has '.eslintrc.cjs' || has '.eslintrc.json' || has '.eslintrc.yaml' || \\\n has '.eslintrc.yml'; } && grep -qF '\"eslint\":' package.json 2>/dev/null; } && echo \"eslint=true\" >> \"$GITHUB_OUTPUT\" || echo \"eslint=false\" >> \"$GITHUB_OUTPUT\"\n { has 'tsconfig.json' && grep -qF '\"typescript\":' package.json 2>/dev/null; } && echo \"tsconfig=true\" >> \"$GITHUB_OUTPUT\" || echo \"tsconfig=false\" >> \"$GITHUB_OUTPUT\"\n has_ext '*.sh' && echo \"shell=true\" >> \"$GITHUB_OUTPUT\" || echo \"shell=false\" >> \"$GITHUB_OUTPUT\"\n has 'Dockerfile' || has_ext '*.Dockerfile' || has 'Containerfile' && \\\n echo \"docker=true\" >> \"$GITHUB_OUTPUT\" || echo \"docker=false\" >> \"$GITHUB_OUTPUT\"\n has_ext '.env*' && echo \"dotenv=true\" >> \"$GITHUB_OUTPUT\" || echo \"dotenv=false\" >> \"$GITHUB_OUTPUT\"\n
|
|
47
|
+
var annotate_default$1 = "name: Review\n\n# ReviewDog is the annotation layer — posts inline PR diff annotations.\n# Runs on pull_request only: inline annotations require PR context,\n# and branch protection ensures all changes go through PRs anyway.\n# scan-secrets.yml / lint-data.yml\n# are the CI gates covering push + PR events. Gitleaks and YAML are\n# intentionally duplicated: those gate merges; ReviewDog surfaces exact\n# line annotations in the PR diff.\n#\n# Inclusive language (alex) is not run here: Sentinel owns that check (`lint:language / Run alex`), reading the org's own\n# allow-list (`process-sentinel-and-actions-roles`, #2263, #831).\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n\njobs:\n reviewdog:\n name: Post inline lint annotations\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: read\n pull-requests: write\n\n steps:\n - name: Checkout repository\n uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n with:\n fetch-depth: 0\n\n - name: Setup\n if: ${{ hashFiles('pnpm-lock.yaml') != '' }}\n uses: theholocron/.github/.github/actions/setup@main\n\n - name: Install ReviewDog\n uses: reviewdog/action-setup@d8a7baabd7f3e8544ee4dbde3ee41d0011c3a93f # v1\n with:\n reviewdog_version: latest\n\n # Detect which tools are relevant for this repo, excluding node_modules.\n # hashFiles('**/*') recurses into node_modules/.pnpm and produces false\n # positives for repos that don't own those file types.\n # -print -quit stops find after the first match without a pipe, avoiding\n # the SIGPIPE/pipefail exit-141 that find|head-1 triggers under\n # GitHub Actions' default bash --noprofile --norc -e -o pipefail mode.\n - name: Detect project features\n id: detect\n shell: bash\n run: |\n has() { find . -not -path '*/node_modules/*' -name \"$1\" -print -quit 2>/dev/null | grep -q .; }\n has_ext() { find . -not -path '*/node_modules/*' -name \"$1\" -print -quit 2>/dev/null | grep -q .; }\n { { has 'eslint.config.js' || has 'eslint.config.mjs' || has 'eslint.config.cjs' || \\\n has 'eslint.config.ts' || has '.eslintrc' || has '.eslintrc.js' || \\\n has '.eslintrc.cjs' || has '.eslintrc.json' || has '.eslintrc.yaml' || \\\n has '.eslintrc.yml'; } && grep -qF '\"eslint\":' package.json 2>/dev/null; } && echo \"eslint=true\" >> \"$GITHUB_OUTPUT\" || echo \"eslint=false\" >> \"$GITHUB_OUTPUT\"\n { has 'tsconfig.json' && grep -qF '\"typescript\":' package.json 2>/dev/null; } && echo \"tsconfig=true\" >> \"$GITHUB_OUTPUT\" || echo \"tsconfig=false\" >> \"$GITHUB_OUTPUT\"\n has_ext '*.sh' && echo \"shell=true\" >> \"$GITHUB_OUTPUT\" || echo \"shell=false\" >> \"$GITHUB_OUTPUT\"\n has 'Dockerfile' || has_ext '*.Dockerfile' || has 'Containerfile' && \\\n echo \"docker=true\" >> \"$GITHUB_OUTPUT\" || echo \"docker=false\" >> \"$GITHUB_OUTPUT\"\n has_ext '.env*' && echo \"dotenv=true\" >> \"$GITHUB_OUTPUT\" || echo \"dotenv=false\" >> \"$GITHUB_OUTPUT\"\n\n #\n # Always applicable\n #\n\n - name: Gitleaks (secrets)\n uses: reviewdog/action-gitleaks@2b7b5685e3e3eecddab5d30cfa04f18123031421 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / gitleaks\"\n fail_level: error\n gitleaks_flags: --log-opts=${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}\n\n - name: YamlLint\n if: ${{ hashFiles('.yamllint.yml') != '' }}\n uses: reviewdog/action-yamllint@020fba38ce9fed550c704d933aeeb7d6360f7d47 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / yamllint\"\n fail_level: error\n yamllint_flags: -c ${{ github.workspace }}/.yamllint.yml ${{ github.workspace }}\n\n - name: ActionLint (GitHub Actions)\n if: ${{ hashFiles('.github/workflows/*.yml', '.github/workflows/*.yaml') != '' }}\n uses: reviewdog/action-actionlint@ae857e78c1b42b3d0a49637181b09d3d56d402b4 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / actionlint\"\n fail_level: error\n\n #\n # TypeScript / JavaScript\n #\n\n - name: ESLint\n if: steps.detect.outputs.eslint == 'true'\n uses: reviewdog/action-eslint@6dad10dc50476699ad1ddbbb19bf55d36f311a39 # v1.37.0\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / eslint\"\n fail_level: error\n eslint_flags: .\n\n - name: TypeScript\n if: steps.detect.outputs.tsconfig == 'true'\n uses: EPMatt/reviewdog-action-tsc@63d923a3c5b4497671940b8874f58a404e2351b5 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / tsc\"\n fail_level: error\n\n #\n # Shell\n #\n\n - name: ShellCheck\n if: steps.detect.outputs.shell == 'true'\n uses: reviewdog/action-shellcheck@b4ffc0b2a69f857f82b74d1310cd3e62e932f9f7 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / shellcheck\"\n fail_level: none\n\n #\n # Docker\n #\n\n - name: Hadolint\n if: steps.detect.outputs.docker == 'true'\n uses: reviewdog/action-hadolint@a3bc84c51f4ddbcbc5b91d950d0b66c15c88b113 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / hadolint\"\n fail_level: none\n\n #\n # Environment files\n #\n\n - name: dotenv-linter\n if: steps.detect.outputs.dotenv == 'true'\n uses: dotenv-linter/action-dotenv-linter@afde61cfda2ecffe7bea35837b6f20b956c88689 # v3.0.0\n with:\n reporter: github-code-suggestions\n";
|
|
48
48
|
var build_default$1 = "name: Build\n\n# Sanity check that every workspace actually compiles to dist/ — doesn't\n# upload or publish anything. delivery.publish builds again before\n# publishing; this just answers \"does it build?\" on every push/PR.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n build:\n name: Build every workspace\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Build\n with:\n task: build\n affected: ${{ inputs.affected }}\n";
|
|
49
|
-
var check_dispatched_default = "name: Dispatched Check\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n repo:\n description: Target repo, \"owner/name\", to check out and run the task against.\n type: string\n required: true\n ref:\n description: Git ref (branch or commit SHA) to check out.\n type: string\n required: true\n task:\n description: The holocron task name to run (e.g. \"verification.typeSafety\").\n type: string\n required: true\n check-run-id:\n description: >\n ID of the check run already posted as \"queued\" on the target repo —\n patched to \"completed\" once the task finishes.\n type: string\n required: true\n\npermissions:\n contents: read\n\njobs:\n run-task:\n name: Run a Sentinel-dispatched task against another repo\n runs-on: ubuntu-latest\n timeout-minutes: 20\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n # actions/create-github-app-token defaults to scoping its token to the\n # *current* repo (.github, where this workflow runs) when owner/\n # repositories are omitted — useless here, since every real use of this\n # token targets inputs.repo instead. Split \"owner/name\" up front so the\n # token step below can scope explicitly to the actual target.\n - name: Parse target repo\n id: target\n run: |\n echo \"owner=${INPUT_REPO%%/*}\" >> \"$GITHUB_OUTPUT\"\n echo \"name=${INPUT_REPO##*/}\" >> \"$GITHUB_OUTPUT\"\n env:\n INPUT_REPO: ${{ inputs.repo }}\n\n # Sentinel's own dispatch call only carries plain, non-secret inputs\n # (repo/ref/task/check-run-id — all visible in the Actions UI/logs).\n # This step mints a fresh, short-lived installation token here instead,\n # scoped by the same App's stored credentials — never a raw token\n # passed through a dispatch input.\n - name: Generate installation token\n id: app-token\n uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_GITHUB_APP_ID || secrets.SENTINEL_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY || secrets.SENTINEL_APP_PRIVATE_KEY }}\n owner: ${{ steps.target.outputs.owner }}\n repositories: ${{ steps.target.outputs.name }}\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout target repository\n with:\n repository: ${{ inputs.repo }}\n ref: ${{ inputs.ref }}\n token: ${{ steps.app-token.outputs.token }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run the task\n id: run-task\n continue-on-error: true\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n task: ${{ inputs.task }}\n\n # A bare .../actions/runs/<id> link lands on the run summary, one click\n # short of the actual step-by-step log a normal check's details_url\n # points at. This job is always alone in its run, so the first (only)\n # job in the run's own job list is unambiguously this one.\n - name: Resolve this job's numeric ID\n id: job-info\n if: always()\n run: |\n job_id=$(gh api \"repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs\" --jq '.jobs[0].id')\n echo \"job_id=$job_id\" >> \"$GITHUB_OUTPUT\"\n env:\n GH_TOKEN: ${{ steps.app-token.outputs.token }}\n\n # Ships the task's real captured output (tsc/vitest/etc — whatever\n # `holocron run` actually printed) to the same Axiom dataset Sentinel's\n # own structured logs already flow into, tagged so it's queryable by\n # this exact run. Reuses the existing dataset rather than provisioning\n # a new one — a prototype-stage call, revisit if CI-log volume ever\n # warrants a dedicated dataset. Builds a permalink filtered to this\n # run's own logs (Axiom's own \"copy query link\" URL shape:\n # /<org>/query?initForm={\"apl\":\"...\"} ) so a viewer lands directly on\n # the relevant lines, not a bare dataset view.\n - name: Ship task output to Axiom\n id: axiom\n if: always()\n run: |\n message=$(tail -c 40000 \"$LOG_FILE\" 2>/dev/null || echo \"(no output captured)\")\n # \"level\" is one of the field names Axiom's Stream/Query tabs\n # recognize for severity-color highlighting (docs: level, @level,\n # severity, @severity, status.code) -- conclusion alone isn't.\n level=$([ \"$CONCLUSION\" = \"success\" ] && echo \"info\" || echo \"error\")\n event=$(jq -cn \\\n --arg time \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" \\\n --arg repo \"$REPO\" --arg task \"$TASK\" --arg run_id \"$GITHUB_RUN_ID\" \\\n --arg job_id \"$JOB_ID\" --arg check_run_id \"$CHECK_RUN_ID\" \\\n --arg conclusion \"$CONCLUSION\" --arg level \"$level\" --arg message \"$message\" \\\n '{_time: $time, source: \"dispatched-check\", repo: $repo, task: $task,\n run_id: $run_id, job_id: $job_id, check_run_id: $check_run_id,\n conclusion: $conclusion, level: $level, message: $message}')\n curl -sf -X POST \"https://api.axiom.co/v1/datasets/${SENTINEL_AXIOM_DATASET}/ingest\" \\\n -H \"Authorization: Bearer ${AXIOM_TOKEN}\" \\\n -H \"Content-Type: application/json\" \\\n -d \"[${event}]\" || echo \"::warning::Axiom ingest failed — continuing, the check itself still reports the real result\"\n\n # The ['...'] is Axiom's own APL array-dataset-reference syntax, not\n # a shell quote boundary — $SENTINEL_AXIOM_DATASET/$CHECK_RUN_ID both expand\n # fine here; shellcheck's single-quote heuristic just can't tell.\n # shellcheck disable=SC2016\n apl=\"['${SENTINEL_AXIOM_DATASET}'] | where check_run_id == \\\"${CHECK_RUN_ID}\\\"\"\n init_form=$(jq -cn --arg apl \"$apl\" '{apl: $apl}')\n encoded=$(jq -rn --arg s \"$init_form\" '$s | @uri')\n echo \"query-url=https://app.axiom.co/${HOLOCRON_AXIOM_ORG}/query?initForm=${encoded}\" >> \"$GITHUB_OUTPUT\"\n env:\n LOG_FILE: ${{ steps.run-task.outputs.log-file }}\n REPO: ${{ inputs.repo }}\n TASK: ${{ inputs.task }}\n JOB_ID: ${{ steps.job-info.outputs.job_id }}\n CHECK_RUN_ID: ${{ inputs.check-run-id }}\n CONCLUSION: ${{ steps.run-task.outcome == 'success' && 'success' || 'failure' }}\n # Org variables (1Password Environment `theholocron/holocron - ci`, synced by\n # `repo.variables.sync`); no literal fallback. The variable keeps its bare name in GitHub and\n # 1Password; the workflow maps it onto the prefixed one (#1864).\n HOLOCRON_AXIOM_ORG: ${{ vars.HOLOCRON_AXIOM_ORG || vars.AXIOM_ORG }}\n SENTINEL_AXIOM_DATASET: ${{ vars.SENTINEL_AXIOM_DATASET }}\n AXIOM_TOKEN: ${{ secrets.SENTINEL_AXIOM_INGEST_TOKEN }}\n\n # Always runs, success or failure — the queued check run on the target\n # repo must be resolved either way, not left hanging. Full JSON body via\n # jq + --input, not -f flags: output.text needs real nesting (gh api -f\n # has no dot-notation for that), and the captured task output can\n # contain characters (quotes, $, backticks) that would break a\n # hand-built -f string.\n - name: Report result to the target repo's check run\n if: always()\n run: |\n excerpt=$(tail -c 3000 \"$LOG_FILE\" 2>/dev/null || echo \"(no output captured)\")\n # The single-quoted format string is intentional — every %s fills\n # via printf's own args below, not shell expansion; nothing in it\n # needs to expand.\n # shellcheck disable=SC2016\n text=$(printf '**Task:** `%s`\\n\\n**Result:** %s\\n\\n[Full logs on Axiom](%s)\\n\\n### Last output\\n\\n```\\n%s\\n```\\n' \\\n \"$TASK\" \"$CONCLUSION\" \"$QUERY_URL\" \"$excerpt\")\n body=$(jq -n \\\n --arg conclusion \"$CONCLUSION\" \\\n --arg details_url \"$RUN_URL\" \\\n --arg title \"$TASK ($CONCLUSION)\" \\\n --arg summary \"Dispatched via theholocron/.github — see the log excerpt below, or the full run/Axiom links.\" \\\n --arg text \"$text\" \\\n '{status: \"completed\", conclusion: $conclusion, details_url: $details_url,\n output: {title: $title, summary: $summary, text: $text}}')\n echo \"$body\" | gh api --method PATCH \"/repos/${REPO}/check-runs/${CHECK_RUN_ID}\" --input -\n env:\n # `GH_TOKEN` is the literal name `gh api` requires to auto-authenticate\n # -- not a stand-in for a shared/blanket credential. Its value is the\n # short-lived, Sentinel-App-scoped token minted above, same as the\n # checkout step uses; never secrets.HOLOCRON_SYNC_TOKEN (the one\n # genuinely shared PAT in this org, used by sync-dispatch.yml).\n GH_TOKEN: ${{ steps.app-token.outputs.token }}\n REPO: ${{ inputs.repo }}\n TASK: ${{ inputs.task }}\n CHECK_RUN_ID: ${{ inputs.check-run-id }}\n CONCLUSION: ${{ steps.run-task.outcome == 'success' && 'success' || 'failure' }}\n LOG_FILE: ${{ steps.run-task.outputs.log-file }}\n QUERY_URL: ${{ steps.axiom.outputs.query-url }}\n RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.job-info.outputs.job_id }}\n";
|
|
50
49
|
var check_notify_default$1 = "name: Notify Check\n\n# Proves the notification path end to end, from a real run: that each channel's\n# webhook secret exists, that its webhook accepts a post, and that the alert\n# role ping resolves. It posts one clearly labelled test message per channel and\n# fails the matching job when any step does not work, so a red job names the\n# channel to fix. Manual (workflow_dispatch) only: it posts real messages.\n#\n# Each channel names its own webhook secret, because `setup notifications` lets a\n# layout override the default name (and normalises punctuation), so deriving the\n# name from the channel would miss those. A channel with `\"mention\": true` also\n# requires the role-id secret and pings it: a webhook accepting the post proves\n# the channel works, not that the role ping does, so a missing or malformed role\n# id fails that job instead of passing quietly. Whether Discord lets that role be\n# mentioned at all is checked by `holocron doctor notifications`, not here.\n#\n# The default list is every channel a workflow or the bot writes to through a\n# webhook: alerts, errors, uptime, releases, deploys and sync, plus rules and\n# welcome, the two read-only START HERE channels. Three channels are left out on\n# purpose. `ideas` is a forum: `holocron sync specs` writes its posts\n# through the bot token (HOLOCRON_DISCORD_BOT_TOKEN), and a forum has no webhook\n# post to prove. `holonet` is the doctor's own test channel, written by\n# `holocron doctor notifications`, never by a workflow. `dev` is for people\n# talking, and nothing posts there.\n#\n# Secrets reach this workflow through `secrets: inherit`, so any secret named in\n# `channels` is readable; the declared list below is for callers that pass secrets\n# explicitly.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n channels:\n description: >\n JSON array of channels to check, each `{ \"name\", \"secret\", \"mention\" }`:\n `secret` is the org secret holding that channel's webhook URL and\n `mention: true` also requires and pings the role in\n HOLOCRON_NOTIFY_ALERT_ROLE.\n type: string\n required: false\n default: >-\n [{\"name\":\"sync\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_SYNC\"},\n {\"name\":\"alerts\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_ALERTS\",\"mention\":true},\n {\"name\":\"errors\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_ERRORS\"},\n {\"name\":\"uptime\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_UPTIME\"},\n {\"name\":\"releases\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_RELEASES\"},\n {\"name\":\"deploys\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_DEPLOYS\"},\n {\"name\":\"rules\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_RULES\"},\n {\"name\":\"welcome\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_WELCOME\"}]\n secrets:\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: Webhook for the sync channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: Webhook for the alerts channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ERRORS:\n description: Webhook for the errors channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_UPTIME:\n description: Webhook for the uptime channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: Webhook for the releases channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_DEPLOYS:\n description: Webhook for the deploys channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RULES:\n description: Webhook for the rules channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_WELCOME:\n description: Webhook for the welcome channel.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: Id of the role to mention on the alerts channel's test message. Optional.\n required: false\n\njobs:\n check:\n name: Check ${{ matrix.channel.name }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n strategy:\n # One channel failing must not hide the others: the point is the full picture.\n fail-fast: false\n matrix:\n channel: ${{ fromJSON(inputs.channels) }}\n steps:\n - name: Require the alert role id\n if: matrix.channel.mention\n run: |\n if [ -z \"$ROLE\" ]; then\n echo \"::error::HOLOCRON_NOTIFY_ALERT_ROLE is not set, so the ping on #$CHANNEL cannot be checked.\"\n exit 1\n fi\n env:\n ROLE: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n CHANNEL: ${{ matrix.channel.name }}\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Post a test message to ${{ matrix.channel.name }}\n with:\n strict: \"true\"\n webhook: ${{ secrets[matrix.channel.secret] }}\n # Only a channel marked `mention` pings, and strict mode rejects a malformed id.\n mention: ${{ matrix.channel.mention && secrets.HOLOCRON_NOTIFY_ALERT_ROLE || '' }}\n message: \"🧪 notify check — #${{ matrix.channel.name }} is wired up (${{ github.repository }}, ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})\"\n";
|
|
51
50
|
var check_preview_default$1 = "name: Preview Check\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n preview-url:\n description: The PR's Vercel preview deployment URL, extracted from the triggering `deployment_status` event.\n required: true\n type: string\n sha:\n description: The deployed commit SHA — checked out explicitly, since GitHub evaluates which version of this workflow file to run from the default branch for a deployment_status event (unlike push/pull_request), and actions/checkout defaults to that same ref absent an explicit override.\n required: true\n type: string\n cwd:\n description: Directory to run the check from — the opted-in package's own directory in a monorepo. Defaults to the repo root.\n required: false\n type: string\n default: \".\"\n vercel-project:\n description: >\n Expected Vercel project id/name the preview URL must resolve\n to (verified live via Vercel's API) before\n VERCEL_PROTECTION_BYPASS_SECRET is ever attached to a request\n (holocron#1032 review) — a bare *.vercel.app hostname proves\n nothing on its own, since anyone can register their own\n Vercel project. Omitted → the bypass secret is never\n attached, regardless of whether it's configured.\n required: false\n type: string\n default: \"\"\n secrets:\n VERCEL_TOKEN:\n description: >\n Required alongside vercel-project to verify deployment\n ownership via Vercel's API (read-only use here). Not required\n when vercel-project is omitted.\n required: false\n VERCEL_PROTECTION_BYPASS_SECRET:\n description: >\n Vercel's \"Protection Bypass for Automation\" secret for the\n target project (holocron#1030) — sent as the\n x-vercel-protection-bypass header so this check's request\n isn't redirected to Vercel's own SSO login by Deployment\n Protection, which is on by default for Preview deployments.\n Optional: a check against a URL with protection disabled (or\n a provider other than Vercel) needs nothing here.\n required: false\n\njobs:\n preview-check:\n name: Run monitoring checks against the preview deployment\n permissions:\n contents: read\n # Both read-only, needed by the \"Resolve author trust\" step\n # below: pull-requests to find which PR `inputs.sha` belongs to,\n # and the collaborators/permission lookup (Metadata: read on a\n # PAT, already covered by contents) that step makes against the\n # real PR author.\n pull-requests: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - name: Validate the preview URL\n id: validate\n env:\n CANDIDATE: ${{ inputs.preview-url }}\n run: |\n # `preview-url` comes from the triggering deployment_status\n # event's environment_url -- set by whoever created that\n # deployment status, not necessarily this repo's own\n # delivery.previewDeploy job (anyone with `deployments: write`\n # could create one directly via the API). Validated here,\n # independently of the event's origin, before this runner\n # ever issues an HTTP request to it (the monitoring check\n # below): without this, a crafted environment_url could point\n # the runner at an internal or attacker-controlled host\n # (SSRF) instead of a real Vercel preview. Forwarding the\n # re-serialized `url.href` rather than the raw input also\n # closes off argument injection through embedded whitespace\n # or shell metacharacters -- a string that parses can't carry\n # either.\n host=$(node -e 'try { process.stdout.write(new URL(process.argv[1]).hostname) } catch { process.exit(1) }' \"$CANDIDATE\") || host=\"\"\n if [[ \"$host\" != *.vercel.app ]]; then\n echo \"::error::preview-url '$CANDIDATE' does not parse to a *.vercel.app host (parsed host: '${host:-<unparseable>}')\"\n exit 1\n fi\n url=$(node -e 'const u = new URL(process.argv[1]); if (u.protocol !== \"https:\") process.exit(1); process.stdout.write(u.href)' \"$CANDIDATE\") || {\n echo \"::error::preview-url '$CANDIDATE' did not parse to an https:// URL\"\n exit 1\n }\n echo \"url=$url\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n ref: ${{ inputs.sha }}\n # This checks out and runs a PR's own holocron.config.ts —\n # untrusted until reviewed. Never leave a credential sitting\n # in .git/config for that code to read and exfiltrate; no\n # later step in this job needs to push or pull authenticated.\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Resolve author trust\n id: trust\n env:\n # Ambient, always-available -- no new secret. Only used for\n # two read-only lookups, both within what this token already\n # has by default.\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n SHA: ${{ inputs.sha }}\n run: |\n # Deliberately NOT a value carried in through the\n # deployment's own `payload` field (sourcery review on\n # #1058's first attempt): that field is attacker-controlled\n # by anyone with `deployments: write` -- same precondition\n # already needed to create a deployment_status event at all\n # -- so trusting whatever it claims would let that same\n # attacker forge payload.collaborator_permission = \"admin\"\n # on their own crafted deployment and unlock the bypass\n # secret regardless of who actually authored the code. This\n # step derives trust itself, from data it verifies\n # independently: which real PR `inputs.sha` belongs to, and\n # that PR's real author's current push-access level -- an\n # attacker can't forge either without already having\n # genuine write access to this repo.\n #\n # First attempt used\n # github.event.pull_request.author_association instead, and\n # separately turned out to be wrong for a different reason:\n # that field only reports MEMBER for a *publicly visible* org\n # membership, so a maintainer with private org membership\n # reads as CONTRIBUTOR and would wrongly fail-closed on their\n # own PRs (confirmed live on this exact repo, holocron#1057\n # follow-up). This lookup has neither problem: it reflects\n # real access -- direct collaborator, team membership, or\n # org default -- independent of any profile visibility\n # setting, and needs only \"Pull requests: read\" plus the\n # baseline \"Metadata: read\" every token already has.\n #\n # No PR found for this SHA, or no login on it -> \"none\" ->\n # untrusted. admin/maintain/write are the three roles GitHub\n # itself treats as push-capable. Missing or unrecognized ->\n # untrusted (fail-closed): an absent credential is safer\n # than a wrongly granted one.\n author=$(gh api \"repos/${GITHUB_REPOSITORY}/commits/${SHA}/pulls\" --jq '(.[0] // {}) | .user.login // empty' 2>/dev/null) || author=\"\"\n permission=\"none\"\n if [ -n \"$author\" ]; then\n permission=$(gh api \"repos/${GITHUB_REPOSITORY}/collaborators/${author}/permission\" --jq '.permission // \"none\"' 2>/dev/null) || permission=\"none\"\n fi\n case \"$permission\" in\n admin | maintain | write) trusted=true ;;\n *) trusted=false ;;\n esac\n echo \"trusted=$trusted\" >> \"$GITHUB_OUTPUT\"\n\n - name: Resolve monitoring checks\n id: resolve\n # Untrusted: loads and runs a PR's own holocron.config.ts, same\n # as the checkout above. No secrets in this step's env at all\n # (holocron#1032 review) -- VERCEL_TOKEN and\n # VERCEL_PROTECTION_BYPASS_SECRET live only on the step below,\n # which never loads this repo's config and so never runs a\n # single line of PR-authored code.\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: resolve checks\n args: --cwd=${{ inputs.cwd }} --out=${{ runner.temp }}/monitoring-checks.json\n\n - name: Verify project and run monitoring checks\n env:\n # Read directly by `check resolved`\n # (cli/cli/src/cli/cli.ts) -- not part of the CLI's own\n # `--token`-resolution chain, since neither is a vendor API\n # credential this command calls anything with: VERCEL_TOKEN\n # only verifies, read-only, that the preview URL resolves to\n # vercel-project before VERCEL_PROTECTION_BYPASS_SECRET (a\n # plain header forwarded as-is) is ever attached. The command\n # itself never attaches the bypass header when vercel-project\n # is empty, regardless of whether these secrets are\n # configured -- never attached to an unverified URL.\n #\n # Both gated on `steps.trust.outputs.trusted` (holocron#1057):\n # confirmed live that Vercel forwards this header straight\n # through to the deployed function, so an untrusted PR's own\n # code could read and exfiltrate it off its own incoming\n # request. An untrusted deployment gets neither secret.\n HOLOCRON_VERCEL_TOKEN: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_TOKEN || '' }}\n HOLOCRON_VERCEL_PROTECTION_BYPASS_SECRET: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_PROTECTION_BYPASS_SECRET || '' }}\n # The bare names stay until every caller's CLI reads the prefixed ones (#1864); a CLI that predates them\n # reads only these. The secrets arrive under the bare names here: the caller (`ci.check-preview.yml`) maps `secrets.HOLOCRON_X || secrets.X` onto them, since this workflow is also called with the bare names by repos on the frozen copy.\n VERCEL_TOKEN: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_TOKEN || '' }}\n VERCEL_PROTECTION_BYPASS_SECRET: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_PROTECTION_BYPASS_SECRET || '' }}\n # Not a secret and not gated on trust: the org's Vercel team id\n # (the synced org variable HOLOCRON_VERCEL_TEAM_ID, `repo.variables.sync`; the bare VERCEL_TEAM_ID until it is renamed),\n # which scopes the ownership lookup to the right team. It is\n # read from the org's settings, never from the PR's config\n # (`check resolved` loads none), so a PR cannot change it.\n HOLOCRON_VERCEL_TEAM_ID: ${{ vars.HOLOCRON_VERCEL_TEAM_ID || vars.VERCEL_TEAM_ID }}\n VERCEL_TEAM_ID: ${{ vars.HOLOCRON_VERCEL_TEAM_ID || vars.VERCEL_TEAM_ID }}\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: check resolved\n # vercel-project is NOT gated on trust (sourcery review on\n # #1058's first attempt) -- it isn't a secret, and clearing\n # it for an untrusted deployment would make\n # resolveVercelBypassHeaders treat \"no project given\" as\n # trivially verified (its early-return for an omitted\n # project), skipping ownership verification entirely rather\n # than failing. Always passing the real project here means\n # an untrusted deployment instead hits the \"project given\n # but no token\" branch -- VERCEL_TOKEN is empty above --\n # which fails the check outright, before ever issuing the\n # request, rather than letting an unverified host's response\n # (e.g. a 3xx redirect a status-less assertion wouldn't\n # catch) report green.\n args: --checks-file=${{ runner.temp }}/monitoring-checks.json --vercel-project=${{ inputs.vercel-project }} ${{ steps.validate.outputs.url }}\n";
|
|
52
51
|
var check_tokens_default$1 = "name: Token Expiry\n\n# Runs `holocron doctor secrets --verify` on a schedule, so a token that has been rejected or is about to expire (7 days or\n# fewer left) fails this job and GitHub's failed-workflow notification reaches the team before an operation breaks.\n#\n# Daily, not weekly: the warning window is 7 days, so a weekly run could land just outside it and the next one just\n# after the token lapsed. A daily run fails every day inside the window, which keeps the reminder in view until the\n# token is renewed.\n#\n# A token that is not set is skipped, not a failure, so a repo passes only the secrets it uses. Secrets reach the\n# job through `secrets: inherit`; the declared list below is for callers that pass them explicitly.\n#\n# The run also reads the repo's 1Password credentials provider (`<org/repo> - ci`), so it installs `op` and signs in with\n# `HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN`, a read-only service account for that one Environment. Without it the `1password`\n# rows fail and the job is red every day, which hides a real expiry.\n#\n# It reads the `ci` layer only (`--env ci`): the service account sees that one Environment, and without the flag the\n# run also asks for `local` and `dev`, which it cannot read and so reports as missing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_READ_TOKEN:\n description: Fine-grained token for reading repos and Actions runs.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained token for issues.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Fine-grained token for `sync github`.\n required: false\n HOLOCRON_RELEASE_TOKEN:\n description: Fine-grained token for releases.\n required: false\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained token for repo settings.\n required: false\n HOLOCRON_SECRETS_TOKEN:\n description: Fine-grained organization token for organization secrets.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained token for GitHub Pages.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Fine-grained organization token for teams and organization variables.\n required: false\n HOLOCRON_USER_SYNC_TOKEN:\n description: Fine-grained token for the account links files.\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A read-only 1Password service account for the `ci` layer Environment, so the run can compare it with GitHub.\n required: false\n\njobs:\n token-expiry:\n name: Run holocron doctor secrets --verify\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n HOLOCRON_RELEASE_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN }}\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_SECRETS_TOKEN: ${{ secrets.HOLOCRON_SECRETS_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_USER_SYNC_TOKEN: ${{ secrets.HOLOCRON_USER_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run holocron doctor secrets --verify\n # Only this step holds the service account, not the job: the install action above never sees it.\n env:\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n with:\n task: check-tokens\n args: --env ci\n";
|
|
@@ -77,7 +76,7 @@ var secrets_default$1 = "name: Secret Detection\n\non: # yamllint disable-line r
|
|
|
77
76
|
var sync_dispatch_default = "name: Sync Dispatch\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n steps:\n description: >\n Sync steps to pass to each repo's sync.yml. Default is \"readme\"\n (only README marker blocks are updated).\n type: string\n required: false\n default: readme\n\npermissions:\n contents: read\n\njobs:\n broadcast:\n name: Broadcast sync to all repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - name: Dispatch sync to all repos with sync.yml\n run: |\n gh api \"/orgs/$GITHUB_REPOSITORY_OWNER/repos\" --paginate --jq '.[].name' \\\n | while IFS= read -r repo; do\n gh api \"/repos/$GITHUB_REPOSITORY_OWNER/$repo/contents/.github/workflows/sync.yml\" --silent 2>/dev/null || continue\n echo \"Dispatching sync to $GITHUB_REPOSITORY_OWNER/$repo\"\n gh workflow run sync.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/$repo\" \\\n --field \"steps=$STEPS\" \\\n || echo \"Warning: could not dispatch to $GITHUB_REPOSITORY_OWNER/$repo — skipping\"\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n STEPS: ${{ inputs.steps }}\n";
|
|
78
77
|
var sync_issues_default$1 = "name: Sync Issues\n\n# Keeps the issues of one tracker up to date from another (SPEC-0071 section 4, #1859, spec\n# `tech-issue-sync-schedule-and-assignees`, #2251): runs `holocron sync issues --from <from> --to <to>`, which creates what the\n# target is missing, updates what an earlier sync made and adds the comments it lacks. With `both` it then runs the swapped\n# direction, after the first and in the same job, so two runs never touch the same issue at once (each direction never\n# echoes what the other made).\n#\n# `from` and `to` are the command's endpoints: `github`, or `provider:key=value,...` (`linear:team=ENG`). Only a repo whose\n# `tasks:` lists `sync-issues` (with these inputs under `with:`) gets the caller, so a repo with one tracker is untouched.\n#\n# Tokens reach the job in its environment, never on a command line: `HOLOCRON_LINEAR_TOKEN` from the secret of that name and\n# GitHub's from `HOLOCRON_ISSUES_TOKEN` (the job's own token when that is not set). Scheduled hourly by the caller; a failed\n# run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n from:\n description: Where the issues are read from (`github`, or `provider:key=value,...`).\n type: string\n required: true\n to:\n description: Where they are written, in the same form.\n type: string\n required: true\n since:\n description: Only issues changed since this date or span back from now (2026-03-01, 7d, 12h).\n type: string\n required: false\n default: 2d\n both:\n description: Also run the swapped direction after the first.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_LINEAR_TOKEN:\n description: The Linear API key, when an endpoint is Linear.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: A GitHub token that can read and write issues; the job's own token is used when it is not set.\n required: false\n\njobs:\n sync-issues:\n name: Sync issues between trackers\n permissions:\n contents: read\n issues: write\n runs-on: ubuntu-latest\n timeout-minutes: 20\n # Two runs could each create the same issue on the target, so a second waits for the first.\n concurrency:\n group: sync-issues\n cancel-in-progress: false\n env:\n HOLOCRON_LINEAR_TOKEN: ${{ secrets.HOLOCRON_LINEAR_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN || github.token }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync issues\n with:\n command: sync issues --yes --from ${{ inputs.from }} --to ${{ inputs.to }} --since ${{ inputs.since }}\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync issues, the other way\n if: ${{ inputs.both }}\n with:\n command: sync issues --yes --from ${{ inputs.to }} --to ${{ inputs.from }} --since ${{ inputs.since }}\n";
|
|
79
78
|
var sync_repo_default$1 = "name: Sync\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n steps:\n description: >\n Sync steps to run (default: all). Valid values:\n labels, properties, teams, topics, keywords, description, homepage, readme, workflows, wiki.\n Pass a space-separated list to run a subset, e.g. \"readme\" or \"readme wiki\".\n type: string\n required: false\n secrets:\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained PAT with admin scopes (labels, properties, teams).\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained PAT for GitHub Pages configuration.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained PAT for issue management.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Org-scoped fine-grained PAT for team sync and org properties.\n required: false\n HOLOCRON_READ_TOKEN:\n description: Fine-grained PAT for read-only GitHub API calls.\n required: false\n HOLOCRON_SYNC_TOKEN:\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: >\n Webhook for the sync channel: a sync PR opened and its\n auto-merge result. Unset = no post.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: >\n Webhook for the alerts channel: a failed sync run, or a sync\n PR that needs a manual merge. Unset = no post. The optional\n HOLOCRON_NOTIFY_ALERT_ROLE secret (a role id) makes these posts\n mention that role.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: >\n Id of the role to mention on alerts. Written by `holocron\n setup notifications`; not sensitive, kept as a secret so the same\n token that writes the webhook secrets can write it. Optional.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for gh CLI calls. Used when\n HOLOCRON_SYNC_TOKEN is not set.\n required: false\n\njobs:\n sync:\n name: Run holocron sync\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Serialise the find-or-create-PR and supersede steps repo-wide: the caller's\n # concurrency key is per ref, so runs from different refs could otherwise\n # interleave and leave several sync PRs open.\n concurrency:\n group: repo-sync-pr-${{ github.repository }}\n cancel-in-progress: false\n permissions:\n contents: write\n pull-requests: write\n # Job-level so the `holocron` composite action's steps inherit them.\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run holocron sync\n id: sync\n # The `holocron` action resolves @theholocron/cli from node_modules (or\n # builds the workspace when it's an unbuilt checkout — the holocron repo\n # itself). `inputs.steps` is a space-separated list or empty; the\n # `--steps <list>` arg is omitted when empty.\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: sync\n args: ${{ inputs.steps != '' && format('--steps {0}', inputs.steps) || '' }}\n\n - name: Format generated files\n run: |\n pnpm exec prettier --write README.md docs/src/content/docs/index.mdx 2>/dev/null || true\n # `holocron sync` writes package.json fields (keywords, description,\n # homepage) with a plain assignment, which appends new keys at the\n # end — re-apply the canonical order the lint config enforces.\n pnpm exec eslint --fix --no-warn-ignored package.json 2>/dev/null || true\n\n - uses: theholocron/.github/.github/actions/auto-commit@main\n id: auto-commit\n name: Commit sync changes\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # One branch per source commit (full SHA, so distinct commits never collide): a PR left unreviewed never blocks the\n # next sync, and a re-run for the same commit updates its own branch.\n branch: ${{ format('chore/auto-sync-{0}', github.sha) }}\n commit-message: \"chore: sync from holocron.config\"\n commit-options: \"--no-verify\"\n\n - name: Open PR and enable auto-merge\n id: pr\n if: steps.auto-commit.outputs.changes-detected == 'true'\n run: |\n # Find or create this run's PR first: older PRs are only closed once\n # a replacement exists, so a failure here never leaves the changes\n # without an open PR.\n url=$(gh pr view \"$BRANCH\" --json url --jq .url 2>/dev/null || gh pr create \\\n --title \"chore: sync README and repo metadata\" \\\n --body \"Automated sync from holocron.config. Auto-merges once required checks pass.\" \\\n --base main \\\n --head \"$BRANCH\")\n created=$(gh pr view \"$url\" --json createdAt --jq .createdAt)\n\n # Supersede older sync PRs: same-repo only, exact generated or legacy\n # branch name, and created before this one (a slow older run can\n # never close a newer PR). --limit covers more than the default page.\n gh pr list --state open --limit 200 --json number,headRefName,isCrossRepository,createdAt \\\n --jq \".[] | select(.isCrossRepository | not) | select(.headRefName == \\\"chore/auto-sync\\\" or (.headRefName | test(\\\"^chore/auto-sync-[0-9a-f]{40}$\\\"))) | select(.headRefName != \\\"$BRANCH\\\") | select(.createdAt < \\\"$created\\\") | .number\" |\n while read -r n; do\n gh pr close \"$n\" --delete-branch --comment \"Superseded by $url.\" || true\n done\n\n # Delete pushed sync branches that never got a PR (e.g. a run\n # cancelled between push and PR creation). The repo-wide concurrency\n # group means no other run is mid-flight here.\n open=$(gh pr list --state open --limit 200 --json headRefName --jq '.[].headRefName')\n git ls-remote --heads origin 'refs/heads/chore/auto-sync-*' | sed 's|.*refs/heads/||' |\n while read -r b; do\n [ \"$b\" = \"$BRANCH\" ] && continue\n echo \"$b\" | grep -Eq '^chore/auto-sync-[0-9a-f]{40}$' || continue\n echo \"$open\" | grep -qxF \"$b\" || git push origin --delete \"$b\" || true\n done\n\n # A PR opened with the default GITHUB_TOKEN does not trigger\n # pull_request workflows, so required checks would never start and\n # auto-merge would wait forever.\n if [ \"$HAS_PAT\" != \"true\" ]; then\n echo \"::warning::Sync PR $url opened with GITHUB_TOKEN: checks will not run and auto-merge is skipped. Set HOLOCRON_SYNC_TOKEN.\"\n echo \"Sync PR $url — needs manual merge (no PAT).\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (no PAT, so checks will not run)\"\n attention=true\n elif gh pr merge \"$url\" --auto --squash; then\n echo \"Sync PR $url — auto-merge enabled.\" | tee -a \"$GITHUB_STEP_SUMMARY\"\n result=\"auto-merge enabled\"\n else\n echo \"::warning::Sync PR $url opened but auto-merge could not be enabled; merge it manually.\"\n echo \"Sync PR $url — needs manual merge.\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (auto-merge could not be enabled)\"\n attention=true\n fi\n {\n echo \"url=$url\"\n echo \"result=$result\"\n echo \"attention=${attention:-false}\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n BRANCH: ${{ format('chore/auto-sync-{0}', github.sha) }}\n HAS_PAT: ${{ secrets.HOLOCRON_SYNC_TOKEN != '' || secrets.GH_TOKEN != '' }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # The closing line of `holocron sync` (\"80 ok, 0 fail, 0 skipped\"), for the run's summary and the posts below. A log\n # with no such line gives an empty count, and the posts leave it out.\n - name: Summarise the sync\n id: summary\n if: ${{ !cancelled() && steps.sync.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.sync.outputs.log-file }}\n run: |\n esc=$(printf '\\033')\n counts=$(sed \"s/${esc}\\[[0-9;]*m//g\" \"$LOG_FILE\" | grep -E '^ *[0-9]+ ok, [0-9]+ fail' | tail -1 | sed 's/^ *//' || true)\n echo \"counts=$counts\" >> \"$GITHUB_OUTPUT\"\n if [ -n \"$counts\" ]; then echo \"Sync: $counts\" >> \"$GITHUB_STEP_SUMMARY\"; fi\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of the sync PR\n if: steps.pr.outputs.url != '' && steps.pr.outputs.attention != 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"🔄 ${{ github.repository }}: sync PR ${{ steps.pr.outputs.url }} — ${{ steps.pr.outputs.result }}${{ steps.summary.outputs.counts != '' && format(' ({0})', steps.summary.outputs.counts) || '' }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n # A run that changed nothing opens no PR, so without this post a successful sync is silent.\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that the sync had nothing to change\n if: steps.auto-commit.outputs.changes-detected != 'true' && steps.summary.outputs.counts != ''\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"✅ ${{ github.repository }}: sync ran and found nothing to change (${{ steps.summary.outputs.counts }})${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that a sync PR needs attention\n if: steps.pr.outputs.attention == 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"⚠️ ${{ github.repository }}: sync PR ${{ steps.pr.outputs.url }} — ${{ steps.pr.outputs.result }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - name: Broadcast wiki sync if navbar changed\n if: >-\n steps.auto-commit.outputs.changes-detected == 'true' &&\n github.event_name == 'push' &&\n (inputs.steps == '' || contains(inputs.steps, 'wiki'))\n run: |\n if git diff HEAD~1 --name-only | grep -q 'fern/docs.yml'; then\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=wiki\" \\\n || echo \"skipping broadcast — insufficient permissions\"\n fi\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # A separate job, not a final step: a job-level timeout cancels the sync job\n # before any later step in it can run, so an in-job `if: failure()` step would\n # stay silent on exactly the hang we most want to hear about. `!cancelled()` is\n # false when the whole run was cancelled (a newer run superseded this one), so\n # that expected case stays quiet, while a failed or timed-out sync job alerts.\n notify-failure:\n name: Notify of a failed sync\n needs: sync\n if: ${{ !cancelled() && (needs.sync.result == 'failure' || needs.sync.result == 'cancelled') }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n steps:\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of a failed sync\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"❌ ${{ github.repository }}: sync ${{ needs.sync.result == 'cancelled' && 'timed out or was cancelled' || 'failed' }} — ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n";
|
|
80
|
-
var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's sync secrets (holocron#781, extended per holocron#800): fans the 1Password Environment of the `prod` layer, `theholocron/holocron - prod`\n# (holocron#1671, #2069; it was `Sentinel`, and Doppler's `sentinel`/prd config before that) out to Vercel (only the keys `repo.secrets.deploy` in\n# apps/sentinel/holocron.config.ts names: the `SENTINEL_` prefix and three `HOLOCRON_` names, #2061)
|
|
79
|
+
var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's sync secrets (holocron#781, extended per holocron#800): fans the 1Password Environment of the `prod` layer, `theholocron/holocron - prod`\n# (holocron#1671, #2069; it was `Sentinel`, and Doppler's `sentinel`/prd config before that) out to Vercel (only the keys `repo.secrets.deploy` in\n# apps/sentinel/holocron.config.ts names: the `SENTINEL_` prefix and three `HOLOCRON_` names, #2061). It used to write one key,\n# `SENTINEL_AXIOM_INGEST_TOKEN`, to an organization Actions secret as well, for the dispatched check workflow; Sentinel no longer\n# dispatches it (#2263), so nothing in Actions needs a copy and no GitHub token is passed. apps/sentinel/README.md's \"After registration\"\n# section has the equivalent local invocation and says why each flag is there. The caller is manual only: run it once\n# after registration and again when a secret rotates.\n#\n# `--target production` only, deliberately. A prior version also synced `--target preview` (holocron#1010 follow-up,\n# #1024), reasoning that deploy-preview's function needed the 5 env vars; it does not (`handleWebhookRequest` returns\n# 405 on anything but POST before it reads `env`, and the preview monitoring check only sends a GET). That version ran\n# on 2026-10-14 and synced all 5 keys, `GITHUB_APP_PRIVATE_KEY` included, into Vercel's `preview` target, reachable by\n# any PR's own deployed code, since `deploy-preview` builds every PR from that PR's not-yet-reviewed code. `sync\n# secrets`'s `deployment` destination had no per-key allowlist then (it has one now, #2061: only the keys `repo.secrets.deploy`\n# names reach it, and a run with no entry stops with a ConfigError), so keeping production credentials out of a\n# PR-controlled deploy target entirely was the fix, and `--target production` only stays (the\n# class of exposure #1057/#1058 closed for the Deployment Protection bypass secret). The already-synced preview copies\n# were cleared from Vercel by hand.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n environment:\n description: The layer (local, dev, ci or prod) or the name of the 1Password Environment to sync from.\n required: false\n default: prod\n type: string\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token the sync writes with. `VERCEL_TOKEN` is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `prod` layer Environment.\n required: true\n\njobs:\n sync-secrets:\n name: Sync 1Password to Vercel\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync secrets\n with:\n command: sync\n args: >-\n secrets --env ${{ inputs.environment }} --cwd apps/sentinel --project-id sentinel\n --target production\n";
|
|
81
80
|
var sync_specs_default$1 = "#\n# Keeps a forum post in #ideas for every ADR and spec, in step with the files (#1535, spec\n# `tech-specs-discussion-threads`). It runs `holocron sync specs`, which makes the posts (titled with the document's own title, tagged\n# with the status), writes each post's address into its file as `discussion.url`, and, when a gatekeeper changed a post's\n# tag, changes the file's `status:` line. It also links the id that opens a post to its file once the file is on `alpha` (#1663), which edits the post only. Those are edits to the working tree only: this workflow commits them to the\n# branch `chore/specs-sync` and opens one pull request. The pull request merges itself (auto-merge, once its checks pass)\n# when it only links posts and numbers documents; one that changes a `status:` waits for a review (#1824).\n#\n# Its caller runs it every hour (so a retag becomes a pull request within the hour), when a spec or ADR lands on `alpha`\n# (so its post exists straight away) and on demand, with `dry-run` to see what a run would do. A first run is the\n# backfill: run it as a dry run, then for real.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot) and a forum channel in the layout. Without the\n# token the job warns and does nothing. The pull request is opened with `HOLOCRON_SYNC_TOKEN` when there is one, so its\n# checks run; with the default token they do not, and the pull request needs a push to start them.\n#\n# This replaces the webhook post of #1534: a forum rejects a plain webhook post, and a post per document says more than a\n# line per pull request. A spec in a pull request that has not merged gets its post from the `preview-specs` task (#1600).\n\nname: Sync Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; make and write nothing.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Opens the sync pull request, so that its checks run.\n required: false\n GH_TOKEN:\n description: Fallback for HOLOCRON_SYNC_TOKEN.\n required: false\n\njobs:\n sync-specs:\n name: Sync spec discussions\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same document. The\n # group is shared with `preview-specs`.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: write\n pull-requests: write\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n BRANCH: chore/specs-sync\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussions were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the default branch\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # The whole history: a spec is numbered by when its file was first committed, and its post links the pull\n # request that added it, which the first commit's subject names.\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --dry-run\n else\n node cli/cli/dist/cli.mjs sync specs\n fi\n\n # The command changes the files and never commits. What it changed goes to one branch, force-updated each run, so\n # there is at most one open pull request for it.\n - uses: ./ci/actions/git-identity\n name: Configure git identity\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n\n - name: Commit the edits to the sync branch\n id: commit\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n run: |\n if git diff --quiet; then\n echo \"changed=false\" >> \"$GITHUB_OUTPUT\"\n echo \"Nothing to commit: every post and file is in step.\"\n exit 0\n fi\n git switch -c \"$BRANCH\"\n git add -A .notes docs/wiki\n git commit --no-verify -s -m \"chore(specs): 🔄 sync spec discussions\"\n git push --force origin \"HEAD:refs/heads/$BRANCH\"\n echo \"changed=true\" >> \"$GITHUB_OUTPUT\"\n\n - name: Open the pull request\n if: steps.commit.outputs.changed == 'true'\n run: |\n # An open pull request already carries the new commit: the branch was updated in place.\n if [ \"$(gh pr list --head \"$BRANCH\" --state open --json number --jq length)\" != \"0\" ]; then\n echo \"The sync pull request is open; its branch now has the latest edits.\"\n exit 0\n fi\n cat > \"$RUNNER_TEMP/body.md\" <<'EOF'\n Edits `holocron sync specs` made to the working tree: the address of each spec or ADR discussion post as `discussion.url`, and the `status:` of a document whose post a gatekeeper retagged.\n\n A pull request that only links posts merges itself once its checks pass. One that changes a `status:` waits for a review: the change was asked for by changing the tag on the post in Discord. Merge it to accept the change, or close it and change the tag back. The post is not marked as in step until this merges.\n\n Opened by the Spec discussions workflow (#1535).\n EOF\n gh pr create --base alpha --head \"$BRANCH\" \\\n --title \"chore(specs): 🔄 sync spec discussions\" \\\n --body-file \"$RUNNER_TEMP/body.md\"\n\n # The branch is rebuilt from `alpha` every run, so its one commit is exactly what the pull request changes. A\n # `status:` line in it came from a gatekeeper's retag and waits for a review; links and ids merge themselves.\n # Auto-merge needs the checks to run, which a pull request opened with the default token does not get.\n - name: Merge by itself unless a status changes\n if: steps.commit.outputs.changed == 'true' && env.HOLOCRON_SYNC_TOKEN != ''\n env:\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n run: |\n if git diff HEAD~1 HEAD -U0 -- .notes docs/wiki | grep -Eq '^[+-]status:'; then\n echo \"The sync changes a status: it waits for a review.\"\n gh pr merge \"$BRANCH\" --disable-auto || true\n else\n gh pr merge \"$BRANCH\" --auto --squash\n fi\n";
|
|
82
81
|
var sync_templates_default$1 = "name: Sync Templates\n\n# Builds the holocron CLI from source and pushes updated workflow templates\n# and composite actions to downstream .github repos, by pull request. Its caller\n# runs it whenever the template source files change on main or alpha. The\n# consumer repos are found first: every repo of the org with a holocron.config,\n# except `.github` and the repo this runs in.\n#\n# Secrets required:\n# HOLOCRON_SYNC_TOKEN — fine-grained PAT (resource owner: org) with:\n# Actions: Read and write (dispatch workflow runs via gh workflow run)\n# Contents: Read and write (git trees, blobs, refs)\n# Pull requests: Read and write (open sync PR)\n# Workflows: Read and write (write .github/workflows/*.yml)\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n primary-repo:\n description: >\n Primary .github repo — receives composite actions, reusable workflows,\n and thin-caller templates. Requires a PR (branch protection assumed).\n Empty means the `.github` repo of the owner the workflow runs in.\n type: string\n required: false\n default: \"\"\n secondary-repos:\n description: >\n Space-separated list of secondary repos (reusable workflows + thin\n callers only, no composite actions). Changes are delivered via pull\n request, same as the primary repo. Empty means every repo of the\n owner that has a holocron.config, found by code search.\n type: string\n required: false\n default: \"\"\n sync-branch:\n description: Branch name used for the primary and secondary repo PRs\n type: string\n required: false\n default: chore/sync-templates\n secrets:\n HOLOCRON_SYNC_TOKEN:\n required: true\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to HOLOCRON_SYNC_TOKEN.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when neither\n HOLOCRON_READ_TOKEN nor HOLOCRON_SYNC_TOKEN is set.\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n discover-repos:\n name: Discover consumer repos\n runs-on: ubuntu-latest\n timeout-minutes: 5\n permissions:\n contents: read\n outputs:\n secondary-repos: ${{ steps.find.outputs.secondary-repos }}\n steps:\n - name: Find repos with holocron.config\n id: find\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n OWNER: ${{ github.repository_owner }}\n GIVEN: ${{ inputs.secondary-repos }}\n THIS_REPO: ${{ github.repository }}\n run: |\n if [ -n \"$GIVEN\" ]; then\n echo \"secondary-repos=$GIVEN\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n # $ENV.OWNER and $ENV.THIS_REPO are jq's, read from the environment; the single quotes are meant.\n # shellcheck disable=SC2016\n repos=$(gh api \"search/code?q=filename:holocron.config+org:${OWNER}&per_page=100\" \\\n --jq '[.items[].repository.full_name]\n | unique\n | map(select(. != ($ENV.OWNER + \"/.github\") and . != $ENV.THIS_REPO))\n | join(\" \")')\n echo \"secondary-repos=$repos\" >> \"$GITHUB_OUTPUT\"\n\n sync:\n name: Sync templates\n needs: discover-repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n permissions:\n contents: read\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm build\n name: Build CLI\n\n # Resolve the built CLI from node_modules instead of hard-coding where it\n # lives in this repo (the same lookup the `holocron` composite action does).\n - name: Resolve CLI\n run: echo \"HOLOCRON_CLI=$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\" >> \"$GITHUB_ENV\"\n\n - name: Cache actionlint\n id: cache-actionlint\n uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0\n with:\n path: /tmp/actionlint\n key: actionlint-v1.7.7-linux-amd64\n\n - name: Download actionlint\n if: steps.cache-actionlint.outputs.cache-hit != 'true'\n run: |\n curl -fsSL https://github.com/rhysd/actionlint/releases/download/v1.7.7/actionlint_1.7.7_linux_amd64.tar.gz \\\n | tar -xz -C /tmp actionlint\n\n - name: Validate generated workflows\n run: |\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --output-dir /tmp/sync-validate\n /tmp/actionlint /tmp/sync-validate/.github/workflows/*.yml\n env:\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n\n # By path: the action is new and `theholocron/.github` is frozen (see the `format` action in lint/code.yml).\n # `scope: none` leaves git's own config alone: the identity only goes into the Signed-off-by trailer below.\n - uses: ./ci/actions/git-identity\n name: Resolve git identity\n id: identity\n with:\n scope: none\n resolve: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n\n - name: Sync primary repo (PR)\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$PRIMARY_REPO\" \"$SYNC_BRANCH\" 2>/dev/null || true\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n\n - name: Sync secondary repos (PR)\n if: ${{ needs.discover-repos.outputs.secondary-repos != '' }}\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n for repo in $SECONDARY_REPOS; do\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$repo\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$repo\" \"$SYNC_BRANCH\" 2>/dev/null || true\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n SECONDARY_REPOS: ${{ needs.discover-repos.outputs.secondary-repos }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n";
|
|
83
82
|
var tag_default = "name: Tag\n\n# Release Please — fully automated tag and GitHub Release from Conventional Commits.\n# No package.json or npm publishing required. Operates in \"simple\" mode by default:\n# analyzes commits since the last tag, maintains a rolling Release PR, and creates\n# a tag + GitHub Release when that PR is merged.\n#\n# The calling repo must have two files at the root:\n# release-please-config.json — declares packages and release-type\n# .release-please-manifest.json — tracks the current version\n\non: # yamllint disable-line rule:truthy\n # Self-trigger: when this workflow lives in theholocron/.github itself,\n # push to main runs Release Please for that repo's own releases.\n push:\n branches:\n - main\n workflow_call:\n inputs:\n release-type:\n description: Release Please release type (simple, node, python, etc.)\n type: string\n required: false\n default: simple\n config-file:\n description: Path to release-please-config.json\n type: string\n required: false\n default: release-please-config.json\n manifest-file:\n description: Path to .release-please-manifest.json\n type: string\n required: false\n default: .release-please-manifest.json\n\njobs:\n tag:\n name: Tag release\n permissions:\n contents: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1\n name: Run Release Please\n with:\n release-type: ${{ inputs.release-type }}\n config-file: ${{ inputs.config-file }}\n manifest-file: ${{ inputs.manifest-file }}\n";
|
|
@@ -121,14 +120,11 @@ function workflowFile(id) {
|
|
|
121
120
|
/**
|
|
122
121
|
* The workflows by task id: the source `workflows/<suite>/<leaf>.yml` is `<suite>:<leaf>` and `workflows/<id>.yml` is
|
|
123
122
|
* `<id>` (see {@link idFromSource}); the file a reusable is generated as is `workflowFile(id)`. Most are
|
|
124
|
-
* `workflow_call` implementations; `tag
|
|
125
|
-
* `check-dispatched` is not run via any repo's own thin caller: Sentinel dispatches it directly via the Actions API
|
|
126
|
-
* (holocron#769, holocron#794), so it has no `WORKFLOW_TEMPLATES` entry either.
|
|
123
|
+
* `workflow_call` implementations; `tag` and `sync-dispatch` also start on an event or by hand.
|
|
127
124
|
*/
|
|
128
125
|
const WORKFLOWS = Object.fromEntries(Object.entries(/* @__PURE__ */ Object.assign({
|
|
129
126
|
"../workflows/annotate.yml": annotate_default$1,
|
|
130
127
|
"../workflows/build.yml": build_default$1,
|
|
131
|
-
"../workflows/check-dispatched.yml": check_dispatched_default,
|
|
132
128
|
"../workflows/check-notify.yml": check_notify_default$1,
|
|
133
129
|
"../workflows/check-preview.yml": check_preview_default$1,
|
|
134
130
|
"../workflows/check-tokens.yml": check_tokens_default$1,
|
|
@@ -1477,6 +1473,22 @@ function taskCheckContexts(config, statusContexts) {
|
|
|
1477
1473
|
}
|
|
1478
1474
|
return out;
|
|
1479
1475
|
}
|
|
1476
|
+
// src/generators/required-checks/required-checks.ts
|
|
1477
|
+
/**
|
|
1478
|
+
* The context of the aggregate check: the caller's job (`ci`) and the called job (`Required checks`), as GitHub joins
|
|
1479
|
+
* them for a reusable workflow.
|
|
1480
|
+
*/
|
|
1481
|
+
const AGGREGATE_CHECK = "ci / Required checks";
|
|
1482
|
+
/**
|
|
1483
|
+
* The context of the DCO check: Sentinel's `validate:dco / Run Developer Certificate of Origin`. It replaced the probot DCO
|
|
1484
|
+
* app's `DCO` (#1044). Required on its own, outside the aggregate.
|
|
1485
|
+
*/
|
|
1486
|
+
const DCO_CHECK = "validate:dco / Run Developer Certificate of Origin";
|
|
1487
|
+
/** Ordered, de-duplicated. */
|
|
1488
|
+
function requiredChecks(config, aggregate, statusContexts) {
|
|
1489
|
+
if (aggregate) return [AGGREGATE_CHECK, DCO_CHECK];
|
|
1490
|
+
return [.../* @__PURE__ */ new Set([DCO_CHECK, ...taskCheckContexts(config, statusContexts)])];
|
|
1491
|
+
}
|
|
1480
1492
|
// src/generators/aggregate-checks/aggregate-checks.ts
|
|
1481
1493
|
/**
|
|
1482
1494
|
* What marks a context as a commit status (not a check run) when no provider says: the prefix Codecov's statuses
|
|
@@ -1498,7 +1510,7 @@ function aggregateChecks(config, statusContexts) {
|
|
|
1498
1510
|
const expected = /* @__PURE__ */ new Set();
|
|
1499
1511
|
const statuses = /* @__PURE__ */ new Set();
|
|
1500
1512
|
for (const context of taskCheckContexts(config, statusContexts)) {
|
|
1501
|
-
if (context === "DCO") continue;
|
|
1513
|
+
if (context === "validate:dco / Run Developer Certificate of Origin" || context === "DCO") continue;
|
|
1502
1514
|
if (isStatus(context)) statuses.add(context);
|
|
1503
1515
|
else expected.add(context.split(" / ")[0]);
|
|
1504
1516
|
}
|
|
@@ -1599,8 +1611,8 @@ function readWorkspacePackages(repoRoot) {
|
|
|
1599
1611
|
const REUSABLE_WORKFLOWS = rehomeAll(WORKFLOWS);
|
|
1600
1612
|
/**
|
|
1601
1613
|
* The reusables a repo that hosts them keeps in its own `.github/workflows`, by id: the ones that only run when
|
|
1602
|
-
* another workflow calls them. A reusable that is also started by an event or by hand (`tag`, `sync-dispatch
|
|
1603
|
-
*
|
|
1614
|
+
* another workflow calls them. A reusable that is also started by an event or by hand (`tag`, `sync-dispatch`)
|
|
1615
|
+
* would become a live workflow of the hosting repo, and runs where it is dispatched, so
|
|
1604
1616
|
* it stays out (spec `tech-workflows-in-holocron`, #1216).
|
|
1605
1617
|
*/
|
|
1606
1618
|
function hostedReusableWorkflows() {
|
|
@@ -1610,8 +1622,8 @@ function hostedReusableWorkflows() {
|
|
|
1610
1622
|
}));
|
|
1611
1623
|
}
|
|
1612
1624
|
/**
|
|
1613
|
-
* The path in `theholocron/.github` of the reusable workflow `id`: the old file name, because the frozen copies
|
|
1614
|
-
*
|
|
1625
|
+
* The path in `theholocron/.github` of the reusable workflow `id`: the old file name, because the frozen copies live
|
|
1626
|
+
* there under it.
|
|
1615
1627
|
*/
|
|
1616
1628
|
function remotePath(id) {
|
|
1617
1629
|
return `.github/workflows/${legacyFile(workflowFile(id))}`;
|
|
@@ -1703,17 +1715,6 @@ function stampDeprecated(content, path) {
|
|
|
1703
1715
|
...rest
|
|
1704
1716
|
].join("\n");
|
|
1705
1717
|
}
|
|
1706
|
-
// src/generators/required-checks/required-checks.ts
|
|
1707
|
-
/**
|
|
1708
|
-
* The context of the aggregate check: the caller's job (`ci`) and the called job (`Required checks`), as GitHub joins
|
|
1709
|
-
* them for a reusable workflow.
|
|
1710
|
-
*/
|
|
1711
|
-
const AGGREGATE_CHECK = "ci / Required checks";
|
|
1712
|
-
/** Ordered, de-duplicated. */
|
|
1713
|
-
function requiredChecks(config, aggregate, statusContexts) {
|
|
1714
|
-
if (aggregate) return [AGGREGATE_CHECK, "DCO"];
|
|
1715
|
-
return [.../* @__PURE__ */ new Set(["DCO", ...taskCheckContexts(config, statusContexts)])];
|
|
1716
|
-
}
|
|
1717
1718
|
// src/generators/scripts/check-package-scripts/check-package-scripts.ts
|
|
1718
1719
|
/** Variants of a script that npm and pnpm users already expect (`test:watch`, `lint:fix`); not task ids. */
|
|
1719
1720
|
const VARIANT_SCRIPTS = /* @__PURE__ */ new Set(["test:watch", "lint:fix"]);
|
|
@@ -2105,8 +2106,8 @@ function scriptsFor(config, registry = TASKS, repo = { monorepo: false }) {
|
|
|
2105
2106
|
/**
|
|
2106
2107
|
* A package-level `tsconfig.json` — the uniform shape confirmed across
|
|
2107
2108
|
* every package checked, parameterized only by the two fields that
|
|
2108
|
-
* genuinely vary (`display`, `paths`). No scaffold/workflow header (
|
|
2109
|
-
*
|
|
2109
|
+
* genuinely vary (`display`, `paths`). No scaffold/workflow header (a strict-JSON
|
|
2110
|
+
* Bucket B file, like `.editorconfig-checker.json` —
|
|
2110
2111
|
* JSON has no comment syntax to carry one, and TypeScript's own tolerance
|
|
2111
2112
|
* for JSONC comments in `tsconfig.json` isn't worth relying on for a file
|
|
2112
2113
|
* this thin).
|
|
@@ -3708,7 +3709,7 @@ function createAstromech(options) {
|
|
|
3708
3709
|
const isDocsSite = key === "deploy-docs";
|
|
3709
3710
|
const isComponents = key === "deploy-components";
|
|
3710
3711
|
if (resolveTaskName(entry.name).every(({ id }) => TASKS[id]?.workflow === false)) continue;
|
|
3711
|
-
if (entry.ci === false || !KNOWN_WORKFLOWS.has(key) && !isDocsSite && !isComponents) continue;
|
|
3712
|
+
if (entry.ci === false || entry.sentinel === true || !KNOWN_WORKFLOWS.has(key) && !isDocsSite && !isComponents) continue;
|
|
3712
3713
|
if (key === "deploy" && entry.with?.["on"] === "release") continue;
|
|
3713
3714
|
const rawWith = isDocsSite ? {
|
|
3714
3715
|
preview: true,
|
|
@@ -3759,22 +3760,10 @@ function createAstromech(options) {
|
|
|
3759
3760
|
ensureTurboDependency: (packageJson, workspaceYaml) => ensureTurboDependency(packageJson, workspaceYaml)
|
|
3760
3761
|
};
|
|
3761
3762
|
}
|
|
3762
|
-
// src/templates/configs/alexjs/alexignore
|
|
3763
|
-
var alexignore_default = ".github/*\nCHANGELOG.md\nLICENSE\n";
|
|
3764
|
-
// src/templates/configs/alexjs/create-config.ts
|
|
3765
|
-
const { workflowHeader: workflowHeader$10 } = createHeader({ source: "cli/astromech/src/templates/configs/alexjs/create-config.ts" });
|
|
3766
|
-
/** The `.alexrc.json` body: the org's inclusive-language allow-list. */
|
|
3767
|
-
function createRcConfig() {
|
|
3768
|
-
return formatJson(alexrc_default);
|
|
3769
|
-
}
|
|
3770
|
-
/** The `.alexignore` body. */
|
|
3771
|
-
function createIgnoreConfig() {
|
|
3772
|
-
return `${workflowHeader$10()}${alexignore_default}`;
|
|
3773
|
-
}
|
|
3774
3763
|
// src/templates/configs/commit-msg/commit-msg
|
|
3775
3764
|
var commit_msg_default = "__HOLOCRON_SCRIPT__ run lint commit-msg \"$1\"\n";
|
|
3776
3765
|
// src/templates/configs/commit-msg/create-config.ts
|
|
3777
|
-
const { workflowHeader: workflowHeader$
|
|
3766
|
+
const { workflowHeader: workflowHeader$8 } = createHeader({ source: "cli/astromech/src/templates/configs/commit-msg/create-config.ts" });
|
|
3778
3767
|
/**
|
|
3779
3768
|
* `.husky/commit-msg` — lints the commit message via `holocron run lint
|
|
3780
3769
|
* commit-msg` (holocron#789), the real programmatic replacement for
|
|
@@ -3785,15 +3774,7 @@ const { workflowHeader: workflowHeader$9 } = createHeader({ source: "cli/astrome
|
|
|
3785
3774
|
* `pnpm exec holocron`; the source repo passes `node cli/cli/dist/cli.mjs`.
|
|
3786
3775
|
*/
|
|
3787
3776
|
function createConfig(holocronScript = "pnpm exec holocron") {
|
|
3788
|
-
return `${workflowHeader$
|
|
3789
|
-
}
|
|
3790
|
-
// src/templates/configs/dco/dco.yml
|
|
3791
|
-
var dco_default = "allowRemediationCommits:\n individual: true\n";
|
|
3792
|
-
// src/templates/configs/dco/create-config.ts
|
|
3793
|
-
const { workflowHeader: workflowHeader$8 } = createHeader({ source: "cli/astromech/src/templates/configs/dco/create-config.ts" });
|
|
3794
|
-
/** The `.github/dco.yml` body, which lets a maintainer remediate a missing sign-off with a follow-up commit. */
|
|
3795
|
-
function createConfig$1() {
|
|
3796
|
-
return `${workflowHeader$8()}${dco_default}`;
|
|
3777
|
+
return `${workflowHeader$8("shebang")}${commit_msg_default.replace("__HOLOCRON_SCRIPT__", holocronScript)}`;
|
|
3797
3778
|
}
|
|
3798
3779
|
// src/templates/configs/dependabot/dependabot.yml
|
|
3799
3780
|
var dependabot_default = "version: 2\nupdates:\n - package-ecosystem: npm\n directory: /\n schedule:\n interval: weekly\n labels:\n - dependencies\n commit-message:\n prefix: \"chore(deps)\"\n prefix-development: \"chore(deps-dev)\"\n groups:\n security-patches:\n applies-to: security-updates\n patterns:\n - \"*\"\n all-dependencies:\n update-types:\n - minor\n - patch\n\n - package-ecosystem: github-actions\n directory: /\n schedule:\n interval: weekly\n labels:\n - dependencies\n commit-message:\n prefix: \"chore(deps)\"\n groups:\n all-actions:\n patterns:\n - \"*\"\n";
|
|
@@ -3814,7 +3795,7 @@ function directoriesBlock(sources) {
|
|
|
3814
3795
|
* `ignore` entry on the npm ecosystem, and `sources` are watched next to `/` (`.github/workflows`) by the
|
|
3815
3796
|
* github-actions one; with neither, the file is the shared body unchanged.
|
|
3816
3797
|
*/
|
|
3817
|
-
function createConfig$
|
|
3798
|
+
function createConfig$1({ ignore = [], sources = [] } = {}) {
|
|
3818
3799
|
let body = dependabot_default;
|
|
3819
3800
|
if (ignore.length > 0) body = body.replace(NPM_GROUPS, `${ignoreBlock(ignore)}${NPM_GROUPS}`);
|
|
3820
3801
|
if (sources.length > 0) {
|
|
@@ -3826,7 +3807,7 @@ function createConfig$2({ ignore = [], sources = [] } = {}) {
|
|
|
3826
3807
|
// src/templates/configs/devmoji/create-config.ts
|
|
3827
3808
|
const { workflowHeader: workflowHeader$6 } = createHeader({ source: "cli/astromech/src/templates/configs/devmoji/create-config.ts" });
|
|
3828
3809
|
/** The `devmoji.config.cjs` body, which defers to `@theholocron/devmoji-config`. */
|
|
3829
|
-
function createConfig$
|
|
3810
|
+
function createConfig$2() {
|
|
3830
3811
|
return [
|
|
3831
3812
|
workflowHeader$6("cjs"),
|
|
3832
3813
|
`/* eslint-disable */`,
|
|
@@ -3840,7 +3821,7 @@ var editorconfig_default = "root = true\n\n[*]\nend_of_line = lf\ncharset = utf-
|
|
|
3840
3821
|
// src/templates/configs/editorconfig/create-config.ts
|
|
3841
3822
|
const { workflowHeader: workflowHeader$5 } = createHeader({ source: "cli/astromech/src/templates/configs/editorconfig/create-config.ts" });
|
|
3842
3823
|
/** The `.editorconfig` body, under the auto-generated header. */
|
|
3843
|
-
function createConfig$
|
|
3824
|
+
function createConfig$3() {
|
|
3844
3825
|
return `${workflowHeader$5()}${editorconfig_default}`;
|
|
3845
3826
|
}
|
|
3846
3827
|
// src/templates/configs/editorconfig-checker/create-config.ts
|
|
@@ -3855,7 +3836,7 @@ function createConfig$4() {
|
|
|
3855
3836
|
* options here (`Exclude`, `Disable`) are stable across releases, so pinning
|
|
3856
3837
|
* buys nothing.
|
|
3857
3838
|
*/
|
|
3858
|
-
function createConfig$
|
|
3839
|
+
function createConfig$4() {
|
|
3859
3840
|
return formatJson(editorconfig_checker_default);
|
|
3860
3841
|
}
|
|
3861
3842
|
// src/templates/configs/labeler/labeler.yml
|
|
@@ -3863,7 +3844,7 @@ var labeler_default = "bug:\n - \"^fix\"\n\nchore:\n - '^chore(?!\\(deps)'\n\n
|
|
|
3863
3844
|
// src/templates/configs/labeler/create-config.ts
|
|
3864
3845
|
const { workflowHeader: workflowHeader$4 } = createHeader({ source: "cli/astromech/src/templates/configs/labeler/create-config.ts" });
|
|
3865
3846
|
/** The `.github/labeler.yml` body, which labels a pull request by its Conventional Commit type. */
|
|
3866
|
-
function createConfig$
|
|
3847
|
+
function createConfig$5() {
|
|
3867
3848
|
return `${workflowHeader$4()}${labeler_default}`;
|
|
3868
3849
|
}
|
|
3869
3850
|
// src/templates/configs/pre-commit/pre-commit
|
|
@@ -3882,7 +3863,7 @@ const { workflowHeader: workflowHeader$3 } = createHeader({ source: "cli/astrome
|
|
|
3882
3863
|
* doc — every future commit is permanently blocked, regardless of what's
|
|
3883
3864
|
* actually staged.
|
|
3884
3865
|
*/
|
|
3885
|
-
function createConfig$
|
|
3866
|
+
function createConfig$6() {
|
|
3886
3867
|
return `${workflowHeader$3("shebang")}${pre_commit_default}`;
|
|
3887
3868
|
}
|
|
3888
3869
|
// src/templates/configs/pre-push/pre-push
|
|
@@ -3897,7 +3878,7 @@ const { workflowHeader: workflowHeader$2 } = createHeader({ source: "cli/astrome
|
|
|
3897
3878
|
* @param holocronScript - the command that invokes the CLI. Defaults to
|
|
3898
3879
|
* `pnpm exec holocron`; the source repo passes `node cli/cli/dist/cli.mjs`.
|
|
3899
3880
|
*/
|
|
3900
|
-
function createConfig$
|
|
3881
|
+
function createConfig$7(holocronScript = "pnpm exec holocron") {
|
|
3901
3882
|
return `${workflowHeader$2("shebang")}${pre_push_default.replace("__HOLOCRON_SCRIPT__", holocronScript)}`;
|
|
3902
3883
|
}
|
|
3903
3884
|
// src/templates/configs/prepare-commit-msg/prepare-commit-msg
|
|
@@ -3905,7 +3886,7 @@ var prepare_commit_msg_default = "NAME=$(git config user.name)\nEMAIL=$(git conf
|
|
|
3905
3886
|
// src/templates/configs/prepare-commit-msg/create-config.ts
|
|
3906
3887
|
const { workflowHeader: workflowHeader$1 } = createHeader({ source: "cli/astromech/src/templates/configs/prepare-commit-msg/create-config.ts" });
|
|
3907
3888
|
/** The `.husky/prepare-commit-msg` hook, a shell script under the auto-generated header. */
|
|
3908
|
-
function createConfig$
|
|
3889
|
+
function createConfig$8() {
|
|
3909
3890
|
return `${workflowHeader$1("shebang")}${prepare_commit_msg_default}`;
|
|
3910
3891
|
}
|
|
3911
3892
|
// src/templates/configs/yamllint/.yamlignore
|
|
@@ -3915,11 +3896,11 @@ var _yamllint_default = "---\nextends: default\n\nignore-from-file:\n - .gitign
|
|
|
3915
3896
|
// src/templates/configs/yamllint/create-config.ts
|
|
3916
3897
|
const { workflowHeader } = createHeader({ source: "cli/astromech/src/templates/configs/yamllint/create-config.ts" });
|
|
3917
3898
|
/** The `.yamllint.yml` body, under the auto-generated header. */
|
|
3918
|
-
function createConfig$
|
|
3899
|
+
function createConfig$9() {
|
|
3919
3900
|
return `${workflowHeader()}${_yamllint_default}`;
|
|
3920
3901
|
}
|
|
3921
3902
|
/** The `.yamlignore` body. */
|
|
3922
|
-
function createIgnoreConfig
|
|
3903
|
+
function createIgnoreConfig() {
|
|
3923
3904
|
return `${workflowHeader()}${_yamlignore_default}`;
|
|
3924
3905
|
}
|
|
3925
|
-
export { AGGREGATE_CHECK, CI_ORDER, DEFAULT_ORG, DOCUMENTATION_FLAG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, SUITES, TASKS, TEMPLATE_HOME, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, aggregateChecks, checkPackageScripts, codecovFlagNames, codecovUploads,
|
|
3906
|
+
export { AGGREGATE_CHECK, CI_ORDER, DCO_CHECK, DEFAULT_ORG, DOCUMENTATION_FLAG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, SUITES, TASKS, TEMPLATE_HOME, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, aggregateChecks, checkPackageScripts, codecovFlagNames, codecovUploads, createAstromech, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createHeader, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig as createYamlignore, createConfig$9 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, describeTasks, extractPreviewConfig, formatJson, frozenReusablePaths, generateCombinedDeployContent, generateThinCallerContent, hostedReusableWorkflows, idFromSource, isDeprecated, isGeneratedScript, isTask, legacyCaller, legacyCallerFile, legacyFile, legacyGate, legacyName, legacyWorkflowKey, localize, localizeActions, matchNamespace, mergeScripts, normalizeWorkflowWith, packageLocation, planSuites, planTasks, readWorkspacePackages, requiredChecks, resolveTaskName, reusableTemplates, runCi, runGroup, runTask, scriptName, scriptsFor, stampDeprecated, suiteMembers, taskKey, workflowFile, workflowKey, workflowKeys, workspacePackages };
|
package/dist/lint/index.d.mts
CHANGED
|
@@ -1,34 +1,25 @@
|
|
|
1
1
|
import { QualifiedConfig } from "@commitlint/types";
|
|
2
2
|
/**
|
|
3
3
|
* The org's canonical `alex` (inclusive-language) config, as raw parsed
|
|
4
|
-
* data
|
|
5
|
-
*
|
|
6
|
-
* repo's own
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* is this JSON file, one canonical copy, not each repo's synced one. A
|
|
11
|
-
* central Sentinel check (holocron#769/#793) reads it directly rather
|
|
12
|
-
* than fetching each repo's own copy via the Contents API — the same "one
|
|
13
|
-
* config, not N copies" reasoning `@theholocron/commitlint-config` already
|
|
14
|
-
* established for commit-message linting.
|
|
4
|
+
* data. The one canonical copy is `alexrc.json` beside this file. A central
|
|
5
|
+
* Sentinel check (holocron#769/#793) reads it directly rather than fetching
|
|
6
|
+
* each repo's own copy via the Contents API — the same "one config, not N
|
|
7
|
+
* copies" reasoning `@theholocron/commitlint-config` already established for
|
|
8
|
+
* commit-message linting. `holocron setup` no longer writes a per-repo
|
|
9
|
+
* `.alexrc.json` or `.alexignore` (#831).
|
|
15
10
|
*/
|
|
16
11
|
/**
|
|
17
12
|
* The org's canonical `alex` (inclusive-language) config as data: the words it allows, from the one JSON file
|
|
18
|
-
* `
|
|
13
|
+
* `alexrc.json` beside this module.
|
|
19
14
|
*/
|
|
20
15
|
export declare const ALEX_CONFIG: {
|
|
21
16
|
/** The words `alex` accepts despite its default rules. */
|
|
22
17
|
allow: string[];
|
|
23
18
|
};
|
|
24
19
|
/**
|
|
25
|
-
* Glob-ish path patterns `alex` skips.
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* the real filename `holocron setup` writes, which ECMAScript's own
|
|
29
|
-
* module resolution (`moduleResolution: "nodenext"`) can't import across
|
|
30
|
-
* a package boundary without an extension. Keep in sync with that file by
|
|
31
|
-
* hand; it changes rarely.
|
|
20
|
+
* Glob-ish path patterns `alex` skips: the one copy of the list. It used to be mirrored by hand in an extensionless
|
|
21
|
+
* `alexignore` template that `holocron setup` wrote into each repo as `.alexignore`; setup no longer writes it (#831), so
|
|
22
|
+
* Sentinel's check and the Prettier ignore list read this.
|
|
32
23
|
*/
|
|
33
24
|
export declare const ALEX_IGNORE_PATTERNS: string[];
|
|
34
25
|
/**
|
package/dist/lint/index.mjs
CHANGED
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as editorconfig_checker_default } from "../editorconfig-checker-C9_6QdcT.mjs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import load from "@commitlint/load";
|
|
4
4
|
import lint from "@commitlint/lint";
|
|
5
5
|
// src/lint/alex-config/alex-config.ts
|
|
6
6
|
/**
|
|
7
7
|
* The org's canonical `alex` (inclusive-language) config, as raw parsed
|
|
8
|
-
* data
|
|
9
|
-
*
|
|
10
|
-
* repo's own
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* is this JSON file, one canonical copy, not each repo's synced one. A
|
|
15
|
-
* central Sentinel check (holocron#769/#793) reads it directly rather
|
|
16
|
-
* than fetching each repo's own copy via the Contents API — the same "one
|
|
17
|
-
* config, not N copies" reasoning `@theholocron/commitlint-config` already
|
|
18
|
-
* established for commit-message linting.
|
|
8
|
+
* data. The one canonical copy is `alexrc.json` beside this file. A central
|
|
9
|
+
* Sentinel check (holocron#769/#793) reads it directly rather than fetching
|
|
10
|
+
* each repo's own copy via the Contents API — the same "one config, not N
|
|
11
|
+
* copies" reasoning `@theholocron/commitlint-config` already established for
|
|
12
|
+
* commit-message linting. `holocron setup` no longer writes a per-repo
|
|
13
|
+
* `.alexrc.json` or `.alexignore` (#831).
|
|
19
14
|
*/
|
|
20
15
|
/**
|
|
21
16
|
* The org's canonical `alex` (inclusive-language) config as data: the words it allows, from the one JSON file
|
|
22
|
-
* `
|
|
17
|
+
* `alexrc.json` beside this module.
|
|
23
18
|
*/
|
|
24
|
-
const ALEX_CONFIG =
|
|
19
|
+
const ALEX_CONFIG = { allow: [
|
|
20
|
+
"dead",
|
|
21
|
+
"execute",
|
|
22
|
+
"execution",
|
|
23
|
+
"executes",
|
|
24
|
+
"failure",
|
|
25
|
+
"failures",
|
|
26
|
+
"hook",
|
|
27
|
+
"hooks",
|
|
28
|
+
"host-hostess",
|
|
29
|
+
"husky",
|
|
30
|
+
"period"
|
|
31
|
+
] };
|
|
25
32
|
// src/lint/alex-ignore-patterns/alex-ignore-patterns.ts
|
|
26
33
|
/**
|
|
27
|
-
* Glob-ish path patterns `alex` skips.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* the real filename `holocron setup` writes, which ECMAScript's own
|
|
31
|
-
* module resolution (`moduleResolution: "nodenext"`) can't import across
|
|
32
|
-
* a package boundary without an extension. Keep in sync with that file by
|
|
33
|
-
* hand; it changes rarely.
|
|
34
|
+
* Glob-ish path patterns `alex` skips: the one copy of the list. It used to be mirrored by hand in an extensionless
|
|
35
|
+
* `alexignore` template that `holocron setup` wrote into each repo as `.alexignore`; setup no longer writes it (#831), so
|
|
36
|
+
* Sentinel's check and the Prettier ignore list read this.
|
|
34
37
|
*/
|
|
35
38
|
const ALEX_IGNORE_PATTERNS = [
|
|
36
39
|
".github/*",
|
|
@@ -446,7 +446,6 @@ const LEGACY_NAMES = {
|
|
|
446
446
|
"platform.repoSync": [{ id: "sync-repo" }],
|
|
447
447
|
"platform.syncTemplates": [{ id: "sync-templates" }],
|
|
448
448
|
"platform.notifyCheck": [{ id: "check-notify" }],
|
|
449
|
-
"platform.dispatchedCheck": [{ id: "check-dispatched" }],
|
|
450
449
|
"knowledge.wiki": [{ id: "publish-wiki" }],
|
|
451
450
|
"knowledge.docs": [{ id: "deploy-docs" }],
|
|
452
451
|
"knowledge.components": [{ id: "deploy-components" }],
|
|
@@ -10,6 +10,13 @@ interface TaskEntry {
|
|
|
10
10
|
* in `holocron run ci`. Default `true`.
|
|
11
11
|
*/
|
|
12
12
|
ci?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Sentinel posts this task's check, so no Actions workflow does (`process-sentinel-and-actions-roles`, #2263). No thin
|
|
15
|
+
* caller is written, but the task stays in the manifest: `holocron run ci` runs it locally, and with `required: true` the
|
|
16
|
+
* `ci` aggregate still waits for a check named `<id> / ...`, which Sentinel's check supplies. Unlike `ci: false`, which
|
|
17
|
+
* also takes the task out of `holocron run ci`. Default `false`.
|
|
18
|
+
*/
|
|
19
|
+
sentinel?: boolean;
|
|
13
20
|
/**
|
|
14
21
|
* Write a `"<name>": "holocron run <name>"` script to `package.json` and
|
|
15
22
|
* let `holocron run <name>` resolve the task. Default `true`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.456",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"@commitlint/lint": "^21.2.3",
|
|
56
56
|
"@commitlint/load": "^21.2.3",
|
|
57
57
|
"@commitlint/types": "^21.2.3",
|
|
58
|
-
"@theholocron/datapad": "5.0.0-alpha.454",
|
|
59
58
|
"@theholocron/json-utils": "^1.17.0-alpha.4",
|
|
60
59
|
"@theholocron/fs-utils": "^1.17.0-alpha.4",
|
|
61
60
|
"@theholocron/misc-utils": "^1.17.0-alpha.4",
|
|
61
|
+
"@theholocron/datapad": "5.0.0-alpha.456",
|
|
62
62
|
"@theholocron/pkg-utils": "^1.17.0-alpha.4"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
"tsdown": "^0.23.7",
|
|
74
74
|
"typescript": "^5.9.3",
|
|
75
75
|
"vitest": "^5.1.0",
|
|
76
|
+
"@theholocron/commitlint-config": "^8.9.0-alpha.18",
|
|
76
77
|
"@theholocron/ci": "1.0.0",
|
|
77
78
|
"@theholocron/eslint-config": "^8.9.0-alpha.18",
|
|
78
79
|
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.18",
|
|
79
80
|
"@theholocron/tsconfig": "^8.9.0-alpha.18",
|
|
80
|
-
"@theholocron/commitlint-config": "^8.9.0-alpha.18",
|
|
81
81
|
"@theholocron/tsdown-config": "^8.9.0-alpha.18",
|
|
82
82
|
"@theholocron/vitest-config": "^8.9.0-alpha.18"
|
|
83
83
|
},
|