@intentius/chant 0.108.0 → 0.108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +6 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.d.ts +1 -0
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-workflow.d.ts +25 -0
- package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
- package/dist/workspace/ci-green.d.ts +6 -0
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/main.ts +15 -1
- package/src/cli/registry.ts +6 -0
- package/src/workspace/ci-green-cli.ts +20 -3
- package/src/workspace/ci-green-workflow.test.ts +90 -0
- package/src/workspace/ci-green-workflow.ts +37 -0
- package/src/workspace/ci-green.test.ts +27 -1
- package/src/workspace/ci-green.ts +17 -1
package/dist/cli/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAwG9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAwG9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA6pBpD;AAm5BD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBzE;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAqKvC,CAAC;AA4KF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5E"}
|
package/dist/cli/registry.d.ts
CHANGED
|
@@ -399,6 +399,12 @@ export interface ParsedArgs {
|
|
|
399
399
|
ciChant?: string;
|
|
400
400
|
/** `chant ci workflow --install <command>` (#3573): a step before the tick that installs what `--chant` runs. */
|
|
401
401
|
ciInstall?: string;
|
|
402
|
+
/** `chant ci workflow --token-secret <NAME>` (#3573): the repository secret the tick's tag push authenticates with. */
|
|
403
|
+
ciTokenSecret?: string;
|
|
404
|
+
/** `chant ci workflow --app-id-var <VAR>` (#3573): the Actions variable holding the GitHub App id whose token pushes the tags. */
|
|
405
|
+
ciAppIdVar?: string;
|
|
406
|
+
/** `chant ci workflow --app-key-secret <NAME>` (#3573): the secret holding that App's private key. */
|
|
407
|
+
ciAppKeySecret?: string;
|
|
402
408
|
/**
|
|
403
409
|
* `chant workspace records review <id> --by <principal>` (#2670): the
|
|
404
410
|
* reviewer, as the caller names them. Also `chant workspace records new
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/cli/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mJAAmJ;IACnJ,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC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GAEG;AACH,MAAM,WAAW,UAAU;IACzB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC,CAAC;IACzD,0CAA0C;IAC1C,OAAO,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,UAAU,CAAC;IAChB,4FAA4F;IAC5F,QAAQ,EAAE,OAAO,CAAC;CACnB;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,eAAe,GAAG,IAAI,CAiB/F"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* ci last-green [--json] the newest commit on the branch with a green tag and no revoked tag
|
|
5
5
|
* ci tick [--dry-run] [--forge github] tag the commits that turned green, revoke the ones that turned red
|
|
6
6
|
* ci workflow [--workflow <name>]... [--output <file>] [--chant <command>] [--install <command>]
|
|
7
|
+
* [--token-secret <NAME> | --app-id-var <VAR> --app-key-secret <NAME>]
|
|
7
8
|
* write the root CI file that runs the tick
|
|
8
9
|
*
|
|
9
10
|
* `last-green --json` prints `ci-last-green.schema.json`. The tick and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-green-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-cli.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ci-green-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAWtD,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBzE;AAID,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAUpE;AAeD,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6CxE"}
|
|
@@ -22,6 +22,16 @@
|
|
|
22
22
|
* the workspace root has a `package-lock.json`. chant's own repository uses
|
|
23
23
|
* both to run its source at the commit it checks out.
|
|
24
24
|
*
|
|
25
|
+
* The tick pushes its tags with the credentials actions/checkout leaves in
|
|
26
|
+
* the clone, the Actions token by default. GitHub treats a new ref to a
|
|
27
|
+
* commit whose workflow files differ from the default branch's as an update
|
|
28
|
+
* to those workflows, and the Actions token can never hold the `workflows`
|
|
29
|
+
* permission, so it is refused there. `--token-secret <NAME>` checks out
|
|
30
|
+
* with `secrets.<NAME>` instead, and `--app-id-var <VAR> --app-key-secret
|
|
31
|
+
* <NAME>` mints a GitHub App token first and checks out with that. The
|
|
32
|
+
* tick's own `GITHUB_TOKEN`, which reads check runs, stays the Actions token:
|
|
33
|
+
* a fine-grained personal access token can't call the Checks API.
|
|
34
|
+
*
|
|
25
35
|
* Like a member's pipelines (./member-pipeline.ts), the file starts with the
|
|
26
36
|
* generated-file header naming the command, and the member whose directory
|
|
27
37
|
* the command runs in records it in its generated-file record, so `WSP081`
|
|
@@ -72,7 +82,22 @@ export interface WorkflowInput {
|
|
|
72
82
|
npmLock?: string;
|
|
73
83
|
/** The workspace root relative to the repository root, `.` for the root itself. */
|
|
74
84
|
workspaceRoot: string;
|
|
85
|
+
/** How the tag push authenticates, when not with the Actions token. */
|
|
86
|
+
push?: PushToken;
|
|
75
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* A token the checkout persists for the tick's `git push`: a repository
|
|
90
|
+
* secret, or a GitHub App's installation token minted from its id (an
|
|
91
|
+
* Actions variable) and private key (a secret).
|
|
92
|
+
*/
|
|
93
|
+
export type PushToken = {
|
|
94
|
+
secret: string;
|
|
95
|
+
} | {
|
|
96
|
+
appIdVar: string;
|
|
97
|
+
appKeySecret: string;
|
|
98
|
+
};
|
|
99
|
+
/** A secret or variable name GitHub accepts: letters, digits and underscores, not starting with a digit. */
|
|
100
|
+
export declare const ACTIONS_NAME: RegExp;
|
|
76
101
|
/** The workflow's YAML, without the generated-file header. Deterministic: the same input writes the same bytes. */
|
|
77
102
|
export declare function renderCiGreenWorkflow(input: WorkflowInput): string;
|
|
78
103
|
/** The header line naming the command that regenerates the file, and where to run it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-green-workflow.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-workflow.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ci-green-workflow.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,gEAAgE;AAChE,eAAO,MAAM,sBAAsB,yCAAyC,CAAC;AAC7E,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAKD,yHAAyH;AACzH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAYnD;AAYD,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,sDAAsD;IACtD,SAA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M,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAItE"}
|
|
@@ -144,6 +144,12 @@ export interface TickResult {
|
|
|
144
144
|
* window, make the tags that are due and push them, never forced.
|
|
145
145
|
*/
|
|
146
146
|
export declare function ciTick(req: TickRequest): Promise<TickResult>;
|
|
147
|
+
/**
|
|
148
|
+
* Why the remote refused a tag push, when chant can tell. GitHub refuses a
|
|
149
|
+
* new ref to a commit whose workflow files differ from the default branch's
|
|
150
|
+
* unless the token may update workflows, and the Actions token never may.
|
|
151
|
+
*/
|
|
152
|
+
export declare function pushRefusalCause(stderr: string): string | null;
|
|
147
153
|
/** The text `chant ci tick` prints. */
|
|
148
154
|
export declare function formatTick(r: TickResult, dryRun?: boolean): string;
|
|
149
155
|
export type LastGreenDocument = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-green.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAA6E,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAK1D,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AAEnD,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD,eAAO,MAAM,uBAAuB,4FAA4F,CAAC;AAEjI,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,mQAAkH,CAAC;AACpJ,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,qBAAa,YAAa,SAAQ,KAAK;IAEnC,QAAQ,CAAC,IAAI,EAAE,gBAAgB;IADjC,YACW,IAAI,EAAE,gBAAgB,EAC/B,OAAO,EAAE,MAAM,EAIhB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AM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACvF,GACD;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,gBAAgB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAE7G;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CAqBlF"}
|
package/package.json
CHANGED
package/src/cli/main.ts
CHANGED
|
@@ -486,6 +486,17 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
486
486
|
// `chant ci workflow --install <command>` (#3573): a step before the tick that installs what --chant runs.
|
|
487
487
|
result.ciInstall = args[++i];
|
|
488
488
|
if (!result.ciInstall || result.ciInstall.startsWith("-")) throw new Error("--install needs the install command, such as \"npm install\": --install <command>");
|
|
489
|
+
} else if (arg === "--token-secret") {
|
|
490
|
+
// `chant ci workflow --token-secret <NAME>` (#3573): the secret the tick's tag push authenticates with.
|
|
491
|
+
result.ciTokenSecret = args[++i];
|
|
492
|
+
if (!result.ciTokenSecret || result.ciTokenSecret.startsWith("-")) throw new Error("--token-secret needs a repository secret's name, such as CI_GREEN_TOKEN: --token-secret <NAME>");
|
|
493
|
+
} else if (arg === "--app-id-var") {
|
|
494
|
+
// `chant ci workflow --app-id-var <VAR> --app-key-secret <NAME>` (#3573): a GitHub App token pushes the tags.
|
|
495
|
+
result.ciAppIdVar = args[++i];
|
|
496
|
+
if (!result.ciAppIdVar || result.ciAppIdVar.startsWith("-")) throw new Error("--app-id-var needs the Actions variable holding the App's id: --app-id-var <VAR>");
|
|
497
|
+
} else if (arg === "--app-key-secret") {
|
|
498
|
+
result.ciAppKeySecret = args[++i];
|
|
499
|
+
if (!result.ciAppKeySecret || result.ciAppKeySecret.startsWith("-")) throw new Error("--app-key-secret needs the secret holding the App's private key: --app-key-secret <NAME>");
|
|
489
500
|
} else if (arg === "--verdict") {
|
|
490
501
|
// `chant workspace records review <id> --verdict agree|dissent|abstain` (#2670)
|
|
491
502
|
result.verdict = args[++i];
|
|
@@ -873,10 +884,13 @@ CI:
|
|
|
873
884
|
Reads check runs from the forge, pushes the tags.
|
|
874
885
|
ci workflow [--workflow <name>]... [--output <file>] Write
|
|
875
886
|
[--chant <command>] [--install <command>]
|
|
887
|
+
[--token-secret <NAME> | --app-id-var <VAR> --app-key-secret <NAME>]
|
|
876
888
|
.github/workflows/chant-ci-green.yml, which runs the
|
|
877
889
|
tick when a required workflow completes and every 15m.
|
|
878
890
|
--chant replaces the npx @intentius/chant pin the tick
|
|
879
|
-
runs; --install adds a step before it.
|
|
891
|
+
runs; --install adds a step before it. --token-secret,
|
|
892
|
+
or a GitHub App's id and key, pushes the tags with a
|
|
893
|
+
token that may tag commits changing workflow files.
|
|
880
894
|
|
|
881
895
|
Change sets:
|
|
882
896
|
change-set summary <file> The grouped plan summary of a change-set
|
package/src/cli/registry.ts
CHANGED
|
@@ -400,6 +400,12 @@ export interface ParsedArgs {
|
|
|
400
400
|
ciChant?: string;
|
|
401
401
|
/** `chant ci workflow --install <command>` (#3573): a step before the tick that installs what `--chant` runs. */
|
|
402
402
|
ciInstall?: string;
|
|
403
|
+
/** `chant ci workflow --token-secret <NAME>` (#3573): the repository secret the tick's tag push authenticates with. */
|
|
404
|
+
ciTokenSecret?: string;
|
|
405
|
+
/** `chant ci workflow --app-id-var <VAR>` (#3573): the Actions variable holding the GitHub App id whose token pushes the tags. */
|
|
406
|
+
ciAppIdVar?: string;
|
|
407
|
+
/** `chant ci workflow --app-key-secret <NAME>` (#3573): the secret holding that App's private key. */
|
|
408
|
+
ciAppKeySecret?: string;
|
|
403
409
|
/**
|
|
404
410
|
* `chant workspace records review <id> --by <principal>` (#2670): the
|
|
405
411
|
* reviewer, as the caller names them. Also `chant workspace records new
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* ci last-green [--json] the newest commit on the branch with a green tag and no revoked tag
|
|
5
5
|
* ci tick [--dry-run] [--forge github] tag the commits that turned green, revoke the ones that turned red
|
|
6
6
|
* ci workflow [--workflow <name>]... [--output <file>] [--chant <command>] [--install <command>]
|
|
7
|
+
* [--token-secret <NAME> | --app-id-var <VAR> --app-key-secret <NAME>]
|
|
7
8
|
* write the root CI file that runs the tick
|
|
8
9
|
*
|
|
9
10
|
* `last-green --json` prints `ci-last-green.schema.json`. The tick and the
|
|
@@ -17,12 +18,12 @@ import type { CommandContext } from "../cli/registry";
|
|
|
17
18
|
import { findWorkspaceRoot } from "../project-root";
|
|
18
19
|
import { ciTick, CiGreenError, formatTick, lastGreen } from "./ci-green";
|
|
19
20
|
import { ciForgeFromEnv } from "./ci-green-forge";
|
|
20
|
-
import { CI_GREEN_WORKFLOW_FILE, ciGreenHeader, readWorkflowSources, renderCiGreenWorkflow, workflowsHolding, writeWorkflowFile } from "./ci-green-workflow";
|
|
21
|
+
import { ACTIONS_NAME, CI_GREEN_WORKFLOW_FILE, ciGreenHeader, type PushToken, readWorkflowSources, renderCiGreenWorkflow, workflowsHolding, writeWorkflowFile } from "./ci-green-workflow";
|
|
21
22
|
import { readDeclaration, readerVersion, WorkspaceReadError } from "./declaration";
|
|
22
23
|
import { recordGeneratedFiles, resolveMemberContext, shellArg } from "./member-pipeline";
|
|
23
24
|
import { gitTop, workingTree } from "./tree";
|
|
24
25
|
|
|
25
|
-
const USAGE = "chant ci last-green [--json] | ci tick [--dry-run] [--forge github] | ci workflow [--workflow <name>]... [--output <file>] [--chant <command>] [--install <command>]";
|
|
26
|
+
const USAGE = "chant ci last-green [--json] | ci tick [--dry-run] [--forge github] | ci workflow [--workflow <name>]... [--output <file>] [--chant <command>] [--install <command>] [--token-secret <NAME> | --app-id-var <VAR> --app-key-secret <NAME>]";
|
|
26
27
|
|
|
27
28
|
export async function runCiLastGreen(ctx: CommandContext): Promise<number> {
|
|
28
29
|
const doc = lastGreen({ cwd: process.cwd() });
|
|
@@ -56,9 +57,23 @@ export async function runCiTick(ctx: CommandContext): Promise<number> {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
/** The push token the flags ask for, or none for the Actions token. Throws on a half-given or clashing pair. */
|
|
61
|
+
function pushToken(args: CommandContext["args"]): PushToken | undefined {
|
|
62
|
+
const { ciTokenSecret: secret, ciAppIdVar: appIdVar, ciAppKeySecret: appKeySecret } = args;
|
|
63
|
+
for (const [flag, name] of [["--token-secret", secret], ["--app-id-var", appIdVar], ["--app-key-secret", appKeySecret]] as const) {
|
|
64
|
+
if (name !== undefined && !ACTIONS_NAME.test(name)) throw new Error(`${flag} takes a secret or variable name, letters, digits and underscores, not ${JSON.stringify(name)}`);
|
|
65
|
+
}
|
|
66
|
+
if (secret !== undefined && (appIdVar !== undefined || appKeySecret !== undefined)) throw new Error("--token-secret and --app-id-var/--app-key-secret each name the push token; pass one or the other");
|
|
67
|
+
if ((appIdVar === undefined) !== (appKeySecret === undefined)) throw new Error("a GitHub App token needs both the App's id and its key: --app-id-var <VAR> --app-key-secret <NAME>");
|
|
68
|
+
if (secret !== undefined) return { secret };
|
|
69
|
+
if (appIdVar !== undefined && appKeySecret !== undefined) return { appIdVar, appKeySecret };
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
|
|
59
73
|
export async function runCiWorkflow(ctx: CommandContext): Promise<number> {
|
|
60
74
|
const cwd = process.cwd();
|
|
61
75
|
try {
|
|
76
|
+
const push = pushToken(ctx.args);
|
|
62
77
|
const found = findWorkspaceRoot(cwd);
|
|
63
78
|
if (!found) throw new WorkspaceReadError("declaration-missing", "no chant.workspace.json or .jsonc between this directory and the git root");
|
|
64
79
|
const declaration = readDeclaration(workingTree(found.dir));
|
|
@@ -85,11 +100,13 @@ export async function runCiWorkflow(ctx: CommandContext): Promise<number> {
|
|
|
85
100
|
if (ctx.args.output) parts.push("--output", relative(base, target).split(sep).join("/"));
|
|
86
101
|
if (ctx.args.ciChant) parts.push("--chant", ctx.args.ciChant);
|
|
87
102
|
if (ctx.args.ciInstall) parts.push("--install", ctx.args.ciInstall);
|
|
103
|
+
if (push && "secret" in push) parts.push("--token-secret", push.secret);
|
|
104
|
+
if (push && "appIdVar" in push) parts.push("--app-id-var", push.appIdVar, "--app-key-secret", push.appKeySecret);
|
|
88
105
|
const command = parts.map(shellArg).join(" ");
|
|
89
106
|
const workspaceRoot = relative(repoRoot, root).split(sep).join("/") || ".";
|
|
90
107
|
// The install runs in the workspace root, so its lockfile there keys setup-node's npm cache.
|
|
91
108
|
const npmLock = ctx.args.ciInstall && existsSync(join(root, "package-lock.json")) ? (workspaceRoot === "." ? "package-lock.json" : `${workspaceRoot}/package-lock.json`) : undefined;
|
|
92
|
-
const yaml = renderCiGreenWorkflow({ green, workflows, chantVersion: readerVersion(), workspaceRoot, chant: ctx.args.ciChant, install: ctx.args.ciInstall, npmLock });
|
|
109
|
+
const yaml = renderCiGreenWorkflow({ green, workflows, chantVersion: readerVersion(), workspaceRoot, chant: ctx.args.ciChant, install: ctx.args.ciInstall, npmLock, push });
|
|
93
110
|
const written = writeWorkflowFile(target, ciGreenHeader(command, member ? "member" : "root") + yaml);
|
|
94
111
|
if (member) recordGeneratedFiles(member.memberRoot, [{ path: fromRepo, command }]);
|
|
95
112
|
console.log(`Wrote ${written}: ticks when ${workflows.join(", ")} complete${workflows.length === 1 ? "s" : ""} on ${green.branch}, and every 15 minutes.`);
|
|
@@ -115,6 +115,38 @@ describe("the workflows that hold required check runs (#3573)", () => {
|
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
+
describe("the token the tick pushes its tags with (#3573)", () => {
|
|
119
|
+
const base = { green, workflows: ["ci"], chantVersion: "0.108.0", workspaceRoot: "." };
|
|
120
|
+
|
|
121
|
+
test("without one, checkout persists the Actions token and the tick reads check runs with it", () => {
|
|
122
|
+
const steps = (parseYAMLDocument(renderCiGreenWorkflow(base)) as Yaml).jobs.tick.steps;
|
|
123
|
+
expect(steps[0].with.token).toBeUndefined();
|
|
124
|
+
expect(steps[2].env.GITHUB_TOKEN).toBe("${{ github.token }}");
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
test("--token-secret checks out with the secret, so the push uses it, and nothing else changes", () => {
|
|
128
|
+
const plain = renderCiGreenWorkflow(base);
|
|
129
|
+
const text = renderCiGreenWorkflow({ ...base, push: { secret: "CI_GREEN_TOKEN" } });
|
|
130
|
+
const steps = (parseYAMLDocument(text) as Yaml).jobs.tick.steps;
|
|
131
|
+
expect(steps[0]).toEqual({ uses: "actions/checkout@v6", with: { ref: "main", "fetch-depth": 0, token: "${{ secrets.CI_GREEN_TOKEN }}" } });
|
|
132
|
+
// Check runs are still read with the Actions token: a fine-grained token can't call the Checks API.
|
|
133
|
+
expect(steps[2].env.GITHUB_TOKEN).toBe("${{ github.token }}");
|
|
134
|
+
expect((parseYAMLDocument(text) as Yaml).permissions).toEqual({ contents: "write", checks: "read" });
|
|
135
|
+
expect(text.replace(" token: ${{ secrets.CI_GREEN_TOKEN }}\n", "")).toBe(plain);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test("--app-id-var and --app-key-secret mint an App token before the checkout and check out with it", () => {
|
|
139
|
+
const steps = (parseYAMLDocument(renderCiGreenWorkflow({ ...base, push: { appIdVar: "CI_GREEN_APP_ID", appKeySecret: "CI_GREEN_APP_KEY" } })) as Yaml).jobs.tick.steps;
|
|
140
|
+
expect(steps[0]).toMatchObject({
|
|
141
|
+
id: "app-token",
|
|
142
|
+
uses: "actions/create-github-app-token@v2",
|
|
143
|
+
with: { "app-id": "${{ vars.CI_GREEN_APP_ID }}", "private-key": "${{ secrets.CI_GREEN_APP_KEY }}" },
|
|
144
|
+
});
|
|
145
|
+
expect(steps[1].with.token).toBe("${{ steps.app-token.outputs.token }}");
|
|
146
|
+
expect(steps[3].env.GITHUB_TOKEN).toBe("${{ github.token }}");
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
118
150
|
describe("chant ci workflow (#3573)", () => {
|
|
119
151
|
test("writes the file with its header, records it on the member it ran in, and writes the same bytes twice", async () => {
|
|
120
152
|
const root = scratchDir("chant-ci-workflow-");
|
|
@@ -179,6 +211,64 @@ describe("chant ci workflow (#3573)", () => {
|
|
|
179
211
|
}
|
|
180
212
|
});
|
|
181
213
|
|
|
214
|
+
test("--token-secret goes into the file and its header, and without it the bytes are what they were", async () => {
|
|
215
|
+
const root = scratchDir("chant-ci-workflow-");
|
|
216
|
+
git(root, "init", "-q");
|
|
217
|
+
writeFiles(root, { "chant.workspace.json": declaration([], { ci: { green: GREEN } }), ".github/workflows/ci.yml": CI, ".github/workflows/macos.yml": MACOS });
|
|
218
|
+
const cwd = vi.spyOn(process, "cwd").mockReturnValue(root);
|
|
219
|
+
const log = vi.spyOn(console, "log").mockImplementation(() => {});
|
|
220
|
+
const error = vi.spyOn(console, "error").mockImplementation(() => {});
|
|
221
|
+
try {
|
|
222
|
+
const file = join(root, CI_GREEN_WORKFLOW_FILE);
|
|
223
|
+
expect(await runCiWorkflow({ args: {} } as unknown as CommandContext)).toBe(0);
|
|
224
|
+
const plain = readFileSync(file, "utf-8");
|
|
225
|
+
expect(plain).not.toMatch(/token:|secrets\./);
|
|
226
|
+
|
|
227
|
+
expect(await runCiWorkflow({ args: { ciTokenSecret: "CI_GREEN_TOKEN" } } as unknown as CommandContext)).toBe(0);
|
|
228
|
+
const withToken = readFileSync(file, "utf-8");
|
|
229
|
+
expect(withToken.split("\n")[0]).toBe(`# ${GENERATED_MARKER}. Regenerate with: chant ci workflow --token-secret CI_GREEN_TOKEN (in the workspace root)`);
|
|
230
|
+
const steps = (parseYAMLDocument(withToken) as Yaml).jobs.tick.steps;
|
|
231
|
+
expect(steps[0].with.token).toBe("${{ secrets.CI_GREEN_TOKEN }}");
|
|
232
|
+
expect(steps[2].env.GITHUB_TOKEN).toBe("${{ github.token }}");
|
|
233
|
+
|
|
234
|
+
const app = { args: { ciAppIdVar: "CI_GREEN_APP_ID", ciAppKeySecret: "CI_GREEN_APP_KEY" } } as unknown as CommandContext;
|
|
235
|
+
expect(await runCiWorkflow(app)).toBe(0);
|
|
236
|
+
expect(readFileSync(file, "utf-8").split("\n")[0]).toBe(
|
|
237
|
+
`# ${GENERATED_MARKER}. Regenerate with: chant ci workflow --app-id-var CI_GREEN_APP_ID --app-key-secret CI_GREEN_APP_KEY (in the workspace root)`,
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
// Dropping the flag writes the bytes chant 0.108.0 wrote.
|
|
241
|
+
expect(await runCiWorkflow({ args: {} } as unknown as CommandContext)).toBe(0);
|
|
242
|
+
expect(readFileSync(file, "utf-8")).toBe(plain);
|
|
243
|
+
} finally {
|
|
244
|
+
cwd.mockRestore();
|
|
245
|
+
log.mockRestore();
|
|
246
|
+
error.mockRestore();
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
test("refuses a half-given App, both kinds of token at once, and a name GitHub wouldn't accept", async () => {
|
|
251
|
+
const root = scratchDir("chant-ci-workflow-");
|
|
252
|
+
git(root, "init", "-q");
|
|
253
|
+
writeFiles(root, { "chant.workspace.json": declaration([], { ci: { green: GREEN } }), ".github/workflows/ci.yml": CI });
|
|
254
|
+
const cwd = vi.spyOn(process, "cwd").mockReturnValue(root);
|
|
255
|
+
const errors: string[] = [];
|
|
256
|
+
const error = vi.spyOn(console, "error").mockImplementation((s: unknown) => void errors.push(String(s)));
|
|
257
|
+
try {
|
|
258
|
+
const run = (args: Record<string, string>) => runCiWorkflow({ args } as unknown as CommandContext);
|
|
259
|
+
expect(await run({ ciAppIdVar: "APP_ID" })).toBe(1);
|
|
260
|
+
expect(errors.pop()).toMatch(/both the App's id and its key/);
|
|
261
|
+
expect(await run({ ciTokenSecret: "T", ciAppIdVar: "APP_ID", ciAppKeySecret: "APP_KEY" })).toBe(1);
|
|
262
|
+
expect(errors.pop()).toMatch(/one or the other/);
|
|
263
|
+
expect(await run({ ciTokenSecret: "ci-green token" })).toBe(1);
|
|
264
|
+
expect(errors.pop()).toMatch(/--token-secret takes a secret or variable name/);
|
|
265
|
+
expect(existsSync(join(root, CI_GREEN_WORKFLOW_FILE))).toBe(false);
|
|
266
|
+
} finally {
|
|
267
|
+
cwd.mockRestore();
|
|
268
|
+
error.mockRestore();
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
|
|
182
272
|
test("refuses to write a workflow nothing but the schedule would trigger", async () => {
|
|
183
273
|
const root = scratchDir("chant-ci-workflow-");
|
|
184
274
|
git(root, "init", "-q");
|
|
@@ -22,6 +22,16 @@
|
|
|
22
22
|
* the workspace root has a `package-lock.json`. chant's own repository uses
|
|
23
23
|
* both to run its source at the commit it checks out.
|
|
24
24
|
*
|
|
25
|
+
* The tick pushes its tags with the credentials actions/checkout leaves in
|
|
26
|
+
* the clone, the Actions token by default. GitHub treats a new ref to a
|
|
27
|
+
* commit whose workflow files differ from the default branch's as an update
|
|
28
|
+
* to those workflows, and the Actions token can never hold the `workflows`
|
|
29
|
+
* permission, so it is refused there. `--token-secret <NAME>` checks out
|
|
30
|
+
* with `secrets.<NAME>` instead, and `--app-id-var <VAR> --app-key-secret
|
|
31
|
+
* <NAME>` mints a GitHub App token first and checks out with that. The
|
|
32
|
+
* tick's own `GITHUB_TOKEN`, which reads check runs, stays the Actions token:
|
|
33
|
+
* a fine-grained personal access token can't call the Checks API.
|
|
34
|
+
*
|
|
25
35
|
* Like a member's pipelines (./member-pipeline.ts), the file starts with the
|
|
26
36
|
* generated-file header naming the command, and the member whose directory
|
|
27
37
|
* the command runs in records it in its generated-file record, so `WSP081`
|
|
@@ -143,14 +153,39 @@ export interface WorkflowInput {
|
|
|
143
153
|
npmLock?: string;
|
|
144
154
|
/** The workspace root relative to the repository root, `.` for the root itself. */
|
|
145
155
|
workspaceRoot: string;
|
|
156
|
+
/** How the tag push authenticates, when not with the Actions token. */
|
|
157
|
+
push?: PushToken;
|
|
146
158
|
}
|
|
147
159
|
|
|
160
|
+
/**
|
|
161
|
+
* A token the checkout persists for the tick's `git push`: a repository
|
|
162
|
+
* secret, or a GitHub App's installation token minted from its id (an
|
|
163
|
+
* Actions variable) and private key (a secret).
|
|
164
|
+
*/
|
|
165
|
+
export type PushToken = { secret: string } | { appIdVar: string; appKeySecret: string };
|
|
166
|
+
|
|
167
|
+
/** A secret or variable name GitHub accepts: letters, digits and underscores, not starting with a digit. */
|
|
168
|
+
export const ACTIONS_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
169
|
+
|
|
148
170
|
/** The workflow's YAML, without the generated-file header. Deterministic: the same input writes the same bytes. */
|
|
149
171
|
export function renderCiGreenWorkflow(input: WorkflowInput): string {
|
|
150
172
|
const { green } = input;
|
|
151
173
|
const where = input.workspaceRoot === "." ? [] : [` working-directory: ${q(input.workspaceRoot)}`];
|
|
152
174
|
const cache = input.install && input.npmLock ? [" cache: npm", ...(input.npmLock === "package-lock.json" ? [] : [` cache-dependency-path: ${q(input.npmLock)}`])] : [];
|
|
153
175
|
const tick = input.chant ? q(`${input.chant} ci tick`) : `npx --yes @intentius/chant@${input.chantVersion} ci tick`;
|
|
176
|
+
const push = input.push;
|
|
177
|
+
const mint =
|
|
178
|
+
push && "appIdVar" in push
|
|
179
|
+
? [
|
|
180
|
+
" - name: Mint a GitHub App token that may push tags to commits that change workflows",
|
|
181
|
+
" id: app-token",
|
|
182
|
+
" uses: actions/create-github-app-token@v2",
|
|
183
|
+
" with:",
|
|
184
|
+
` app-id: \${{ vars.${push.appIdVar} }}`,
|
|
185
|
+
` private-key: \${{ secrets.${push.appKeySecret} }}`,
|
|
186
|
+
]
|
|
187
|
+
: [];
|
|
188
|
+
const token = !push ? [] : ["secret" in push ? ` token: \${{ secrets.${push.secret} }}` : " token: ${{ steps.app-token.outputs.token }}"];
|
|
154
189
|
const lines = [
|
|
155
190
|
`name: ${CI_GREEN_WORKFLOW_NAME}`,
|
|
156
191
|
"",
|
|
@@ -182,10 +217,12 @@ export function renderCiGreenWorkflow(input: WorkflowInput): string {
|
|
|
182
217
|
" runs-on: ubuntu-latest",
|
|
183
218
|
" timeout-minutes: 15",
|
|
184
219
|
" steps:",
|
|
220
|
+
...mint,
|
|
185
221
|
" - uses: actions/checkout@v6",
|
|
186
222
|
" with:",
|
|
187
223
|
` ref: ${q(green.branch)}`,
|
|
188
224
|
" fetch-depth: 0",
|
|
225
|
+
...token,
|
|
189
226
|
" - uses: actions/setup-node@v6",
|
|
190
227
|
" with:",
|
|
191
228
|
" node-version: \"24\"",
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { execFileSync } from "node:child_process";
|
|
8
|
+
import { chmodSync, writeFileSync } from "node:fs";
|
|
9
|
+
import { join } from "node:path";
|
|
8
10
|
import { afterAll, describe, expect, test, vi } from "vitest";
|
|
9
11
|
import { parseDeclaration, type CiPhase } from "./declaration";
|
|
10
12
|
import { cleanScratch, contract, declaration, git, scratchDir, writeFiles } from "./__fixtures__/contract-repo";
|
|
11
|
-
import { ciTick, evaluateCommit, evaluatePhase, latestAttempts, lastGreen, matchesCheckRun, windowMs, type LastGreenDocument } from "./ci-green";
|
|
13
|
+
import { ciTick, pushRefusalCause, evaluateCommit, evaluatePhase, latestAttempts, lastGreen, matchesCheckRun, windowMs, type LastGreenDocument } from "./ci-green";
|
|
12
14
|
import type { CheckRun, CiForge } from "./ci-green-forge";
|
|
13
15
|
import { runCiLastGreen } from "./ci-green-cli";
|
|
14
16
|
import lastGreenSchema from "./ci-last-green.schema.json";
|
|
@@ -281,6 +283,30 @@ describe("chant ci tick (#3573)", () => {
|
|
|
281
283
|
expect(remoteTags(origin)).toEqual([]);
|
|
282
284
|
expect(git(root, "tag", "-l")).toBe("");
|
|
283
285
|
});
|
|
286
|
+
|
|
287
|
+
test("a push GitHub refuses for lack of the workflows permission names the cause and the flags that fix it", async () => {
|
|
288
|
+
const { root, origin } = workspace();
|
|
289
|
+
const a = commitAt(root, 1, "app/a.txt");
|
|
290
|
+
push(root);
|
|
291
|
+
// The bare origin refuses tags the way GitHub does when the tagged commit changes a workflow file.
|
|
292
|
+
const hook = join(origin, "hooks", "pre-receive");
|
|
293
|
+
writeFileSync(
|
|
294
|
+
hook,
|
|
295
|
+
"#!/bin/sh\necho 'refusing to allow a GitHub App to create or update workflow `.github/workflows/check.yml` without `workflows` permission' >&2\nexit 1\n",
|
|
296
|
+
);
|
|
297
|
+
chmodSync(hook, 0o755);
|
|
298
|
+
const tick = ciTick({ cwd: root, forge: fakeForge(new Map([[a, PASSING]])), now: NOW });
|
|
299
|
+
await expect(tick).rejects.toThrow(/could not push ci\/green\/[0-9a-f]+ to origin: GitHub refused the tag push because the tagged commit changes workflow files, and GITHUB_TOKEN can't update workflows: regenerate the workflow with --token-secret <NAME>/);
|
|
300
|
+
await expect(ciTick({ cwd: root, forge: fakeForge(new Map([[a, PASSING]])), now: NOW })).rejects.toThrow(/without `workflows` permission/);
|
|
301
|
+
expect(remoteTags(origin)).toEqual([]);
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
test("other push refusals get no workflows hint", () => {
|
|
305
|
+
expect(pushRefusalCause("! [remote rejected] ci/green/abc -> ci/green/abc (refusing to allow a GitHub App to create or update workflow .github/workflows/check.yml without workflows permission)")).toMatch(/--token-secret/);
|
|
306
|
+
expect(pushRefusalCause("refusing to allow an OAuth App to create or update workflow `.github/workflows/x.yml` without `workflow` scope")).toMatch(/--app-id-var/);
|
|
307
|
+
expect(pushRefusalCause("! [rejected] ci/green/abc -> ci/green/abc (already exists)")).toBeNull();
|
|
308
|
+
expect(pushRefusalCause("remote: Permission to o/r.git denied to github-actions[bot].")).toBeNull();
|
|
309
|
+
});
|
|
284
310
|
});
|
|
285
311
|
|
|
286
312
|
// ── last-green ───────────────────────────────────────────────────────────────
|
|
@@ -326,12 +326,28 @@ export async function ciTick(req: TickRequest): Promise<TickResult> {
|
|
|
326
326
|
git(top, ["push", "--quiet", remote, ...due.map((c) => `refs/tags/${c.made!.tag}`)]);
|
|
327
327
|
} catch (err) {
|
|
328
328
|
// The local tags stay until the next tick's fetch prunes the ones the remote lacks.
|
|
329
|
-
|
|
329
|
+
const stderr = stderrOf(err);
|
|
330
|
+
const cause = pushRefusalCause(stderr);
|
|
331
|
+
throw new Error(`could not push ${due.map((c) => c.made!.tag).join(", ")} to ${remote}: ${cause ? `${cause}\n` : ""}${stderr}`);
|
|
330
332
|
}
|
|
331
333
|
}
|
|
332
334
|
return { branch: green.branch, window: green.window, ref: tracking, commits: planned, made: due.map((c) => c.made!.tag) };
|
|
333
335
|
}
|
|
334
336
|
|
|
337
|
+
/**
|
|
338
|
+
* Why the remote refused a tag push, when chant can tell. GitHub refuses a
|
|
339
|
+
* new ref to a commit whose workflow files differ from the default branch's
|
|
340
|
+
* unless the token may update workflows, and the Actions token never may.
|
|
341
|
+
*/
|
|
342
|
+
export function pushRefusalCause(stderr: string): string | null {
|
|
343
|
+
if (!/without [`']?workflows?[`']? (permission|scope)/i.test(stderr)) return null;
|
|
344
|
+
return (
|
|
345
|
+
"GitHub refused the tag push because the tagged commit changes workflow files, and GITHUB_TOKEN can't update workflows: " +
|
|
346
|
+
"regenerate the workflow with --token-secret <NAME>, naming a secret that holds a fine-grained token with Contents and Workflows read and write, " +
|
|
347
|
+
"or with --app-id-var <VAR> --app-key-secret <NAME> for a GitHub App's token"
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
|
|
335
351
|
/** A tagger for an annotated tag when git has none configured, as on a fresh CI runner. The environment's GIT_COMMITTER_* still win. */
|
|
336
352
|
function taggerConfig(top: string): string[] {
|
|
337
353
|
const out: string[] = [];
|