replicas-cli 0.2.422 → 0.2.424
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/index.mjs +100 -15
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -24171,7 +24171,7 @@ replicas automation create ... --disabled
|
|
|
24171
24171
|
# Workspace lifecycle
|
|
24172
24172
|
replicas automation create ... --lifecycle archive_when_done
|
|
24173
24173
|
replicas automation create ... --lifecycle sleep_when_done
|
|
24174
|
-
replicas automation create ... --lifecycle
|
|
24174
|
+
replicas automation create ... --lifecycle default --auto-stop-minutes 30
|
|
24175
24175
|
\`\`\`
|
|
24176
24176
|
|
|
24177
24177
|
When the user says "make me an automation that...", default to **picking the environment for them by listing the available envs** and asking only when the user hasn't already pinned one. Same for repos in GitHub triggers. Don't pepper the user with questions you can answer by reading the existing config.
|
|
@@ -24492,7 +24492,7 @@ function formatTurnElapsed(ms) {
|
|
|
24492
24492
|
}
|
|
24493
24493
|
|
|
24494
24494
|
// ../shared/src/cli-version.ts
|
|
24495
|
-
var CLI_VERSION = "0.2.
|
|
24495
|
+
var CLI_VERSION = "0.2.424";
|
|
24496
24496
|
|
|
24497
24497
|
// ../shared/src/version.ts
|
|
24498
24498
|
function compareVersions(v1, v2) {
|
|
@@ -24579,7 +24579,6 @@ var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"
|
|
|
24579
24579
|
function isWorkspaceSuspendedStatus(status) {
|
|
24580
24580
|
return status === "sleeping" || status === "archived";
|
|
24581
24581
|
}
|
|
24582
|
-
var VALID_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_after_inactivity"];
|
|
24583
24582
|
function workspaceConfigWithCapabilities(config3, capabilities = {}) {
|
|
24584
24583
|
const mergedCapabilities = {
|
|
24585
24584
|
...config3?.capabilities,
|
|
@@ -24662,8 +24661,23 @@ var AUDIT_LOG_ACTIONS = Object.values(AUDIT_LOG_ACTION);
|
|
|
24662
24661
|
|
|
24663
24662
|
// ../shared/src/automations/types.ts
|
|
24664
24663
|
var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
|
|
24664
|
+
var AUTOMATION_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done"];
|
|
24665
|
+
function toAutomationLifecyclePolicy(policy) {
|
|
24666
|
+
if (!policy) return "default";
|
|
24667
|
+
if (policy === "default" || policy === "archive_when_done" || policy === "sleep_when_done") return policy;
|
|
24668
|
+
return "archive_when_done";
|
|
24669
|
+
}
|
|
24665
24670
|
function lifecyclePolicySupportsAutoStop(policy) {
|
|
24666
|
-
return policy === "default"
|
|
24671
|
+
return policy === "default";
|
|
24672
|
+
}
|
|
24673
|
+
|
|
24674
|
+
// ../shared/src/automations/github-checks.ts
|
|
24675
|
+
var AUTOMATION_CHECK_CONCLUSIONS = ["success", "failure"];
|
|
24676
|
+
function isAutomationCheckConclusion(value) {
|
|
24677
|
+
return AUTOMATION_CHECK_CONCLUSIONS.some((conclusion) => conclusion === value);
|
|
24678
|
+
}
|
|
24679
|
+
function normalizeAutomationGithubCheckNames(names) {
|
|
24680
|
+
return names.map((name) => name.trim()).filter(Boolean);
|
|
24667
24681
|
}
|
|
24668
24682
|
|
|
24669
24683
|
// ../shared/src/automations/agent-validation.ts
|
|
@@ -29020,14 +29034,14 @@ function parseModelOption(value) {
|
|
|
29020
29034
|
if (trimmed === "" || trimmed.toLowerCase() === "none") return null;
|
|
29021
29035
|
return normalizeClaudeModel(trimmed) ?? trimmed;
|
|
29022
29036
|
}
|
|
29023
|
-
function
|
|
29024
|
-
return
|
|
29037
|
+
function isAutomationLifecyclePolicy(value) {
|
|
29038
|
+
return AUTOMATION_LIFECYCLE_POLICIES.some((policy) => policy === value);
|
|
29025
29039
|
}
|
|
29026
29040
|
function parseWorkspaceLifecyclePolicyOption(value) {
|
|
29027
29041
|
if (!value) return void 0;
|
|
29028
|
-
if (
|
|
29042
|
+
if (isAutomationLifecyclePolicy(value)) return value;
|
|
29029
29043
|
console.log(chalk17.red(`Invalid lifecycle policy: ${value}`));
|
|
29030
|
-
console.log(chalk17.gray(`Valid options: ${
|
|
29044
|
+
console.log(chalk17.gray(`Valid options: ${AUTOMATION_LIFECYCLE_POLICIES.join(", ")}`));
|
|
29031
29045
|
process.exit(1);
|
|
29032
29046
|
}
|
|
29033
29047
|
function parseExcludedActorsOption(value) {
|
|
@@ -29148,6 +29162,9 @@ function printAutomation(automation2) {
|
|
|
29148
29162
|
if (automation2.triggers.length > 0) {
|
|
29149
29163
|
console.log(chalk17.gray(` Triggers: ${automation2.triggers.map(formatTrigger).join(", ")}`));
|
|
29150
29164
|
}
|
|
29165
|
+
if (automation2.github_check_names.length > 0) {
|
|
29166
|
+
console.log(chalk17.gray(` GitHub checks: ${automation2.github_check_names.join(", ")}`));
|
|
29167
|
+
}
|
|
29151
29168
|
console.log(chalk17.gray(` Prompt: ${truncate2(automation2.prompt, 80)}`));
|
|
29152
29169
|
if (automation2.cron_next_fire_at) {
|
|
29153
29170
|
console.log(chalk17.gray(` Next Run: ${formatDate2(automation2.cron_next_fire_at)}`));
|
|
@@ -29174,6 +29191,9 @@ async function automationListCommand(options) {
|
|
|
29174
29191
|
if (options.limit) params.set("limit", options.limit);
|
|
29175
29192
|
const scope = parseScopeFilter(options.owner);
|
|
29176
29193
|
if (scope) params.set("scope", scope);
|
|
29194
|
+
if (options.triggerType) params.set("trigger_type", options.triggerType);
|
|
29195
|
+
if (options.enabled) params.set("enabled", options.enabled);
|
|
29196
|
+
if (options.search) params.set("search", options.search);
|
|
29177
29197
|
const query = params.toString();
|
|
29178
29198
|
const response = await orgAuthenticatedFetch(
|
|
29179
29199
|
`/v1/automations${query ? "?" + query : ""}`
|
|
@@ -29212,6 +29232,9 @@ Automation: ${automation2.name}
|
|
|
29212
29232
|
console.log(chalk17.gray(` - ${formatTrigger(trigger)}`));
|
|
29213
29233
|
}
|
|
29214
29234
|
}
|
|
29235
|
+
if (automation2.github_check_names.length > 0) {
|
|
29236
|
+
console.log(chalk17.gray(` GitHub checks: ${automation2.github_check_names.join(", ")}`));
|
|
29237
|
+
}
|
|
29215
29238
|
console.log(chalk17.gray(` Prompt: ${automation2.prompt}`));
|
|
29216
29239
|
console.log(chalk17.gray(` Environment: ${automation2.environment_id}`));
|
|
29217
29240
|
if (automation2.cron_expression) {
|
|
@@ -29363,7 +29386,7 @@ async function automationCreateCommand(name, options) {
|
|
|
29363
29386
|
ensureOrgApiAuthenticated();
|
|
29364
29387
|
const lifecyclePolicy = parseAutomationLifecycleOptions(options);
|
|
29365
29388
|
if (options.autoStopMinutes && !lifecyclePolicySupportsAutoStop(lifecyclePolicy ?? "default")) {
|
|
29366
|
-
console.log(chalk17.red("--auto-stop-minutes requires --lifecycle default
|
|
29389
|
+
console.log(chalk17.red("--auto-stop-minutes requires --lifecycle default"));
|
|
29367
29390
|
process.exit(1);
|
|
29368
29391
|
}
|
|
29369
29392
|
if (options.autoStopMinutes) {
|
|
@@ -29505,6 +29528,7 @@ async function automationCreateCommand(name, options) {
|
|
|
29505
29528
|
environment_id: selectedEnvironmentId,
|
|
29506
29529
|
triggers,
|
|
29507
29530
|
enabled: options.enabled !== false,
|
|
29531
|
+
...options.githubChecks !== void 0 ? { github_check_names: normalizeAutomationGithubCheckNames(options.githubChecks.split(",")) } : {},
|
|
29508
29532
|
config: workspaceConfigWithPrFollowups(void 0, prFollowups),
|
|
29509
29533
|
...lifecyclePolicy ? { workspace_lifecycle_policy: lifecyclePolicy } : {},
|
|
29510
29534
|
...options.autoStopMinutes ? { workspace_auto_stop_minutes: parseInt(options.autoStopMinutes, 10) } : {},
|
|
@@ -29561,9 +29585,9 @@ async function automationEditCommand(id, options) {
|
|
|
29561
29585
|
};
|
|
29562
29586
|
try {
|
|
29563
29587
|
const existing = await orgAuthenticatedFetch(`/v1/automations/${id}`);
|
|
29564
|
-
const autoStopLifecyclePolicy = lifecyclePolicy ?? existing.automation.workspace_lifecycle_policy
|
|
29588
|
+
const autoStopLifecyclePolicy = lifecyclePolicy ?? toAutomationLifecyclePolicy(existing.automation.workspace_lifecycle_policy);
|
|
29565
29589
|
if (options.autoStopMinutes && !lifecyclePolicySupportsAutoStop(autoStopLifecyclePolicy)) {
|
|
29566
|
-
console.log(chalk17.red("--auto-stop-minutes requires --lifecycle default
|
|
29590
|
+
console.log(chalk17.red("--auto-stop-minutes requires --lifecycle default"));
|
|
29567
29591
|
process.exit(1);
|
|
29568
29592
|
}
|
|
29569
29593
|
const agentSelection = applyAgentSelection(parsedAgent, {
|
|
@@ -29571,7 +29595,7 @@ async function automationEditCommand(id, options) {
|
|
|
29571
29595
|
model: existing.automation.model
|
|
29572
29596
|
});
|
|
29573
29597
|
const body = {};
|
|
29574
|
-
const hasOptions = options.name || options.prompt || options.enabled !== void 0 || options.prFollowups !== void 0 || options.triggerCron || options.triggerGithub || options.triggerGitlab || options.environment || options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0 || options.lifecycle || options.sleepWhenDone || options.autoStopMinutes || options.agentProvider !== void 0 || options.model !== void 0 || options.thinkingLevel !== void 0 || options.planMode !== void 0 || options.goalMode !== void 0 || options.fastMode !== void 0;
|
|
29598
|
+
const hasOptions = options.name || options.prompt || options.enabled !== void 0 || options.prFollowups !== void 0 || options.triggerCron || options.triggerGithub || options.triggerGitlab || options.environment || options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0 || options.githubChecks !== void 0 || options.addGithubChecks !== void 0 || options.lifecycle || options.sleepWhenDone || options.autoStopMinutes || options.agentProvider !== void 0 || options.model !== void 0 || options.thinkingLevel !== void 0 || options.planMode !== void 0 || options.goalMode !== void 0 || options.fastMode !== void 0;
|
|
29575
29599
|
if (!hasOptions) {
|
|
29576
29600
|
const nameResponse = await prompts5({
|
|
29577
29601
|
type: "text",
|
|
@@ -29631,6 +29655,15 @@ async function automationEditCommand(id, options) {
|
|
|
29631
29655
|
if (options.prFollowups !== void 0) {
|
|
29632
29656
|
body.config = workspaceConfigWithPrFollowups(existing.automation.config, options.prFollowups);
|
|
29633
29657
|
}
|
|
29658
|
+
if (options.githubChecks !== void 0) {
|
|
29659
|
+
body.github_check_names = normalizeAutomationGithubCheckNames(options.githubChecks.split(","));
|
|
29660
|
+
}
|
|
29661
|
+
if (options.addGithubChecks !== void 0) {
|
|
29662
|
+
body.github_check_names = [.../* @__PURE__ */ new Set([
|
|
29663
|
+
...existing.automation.github_check_names,
|
|
29664
|
+
...normalizeAutomationGithubCheckNames(options.addGithubChecks.split(","))
|
|
29665
|
+
])];
|
|
29666
|
+
}
|
|
29634
29667
|
if (options.triggerCron || options.triggerGithub || options.triggerGitlab) {
|
|
29635
29668
|
const triggers = [];
|
|
29636
29669
|
if (options.triggerCron) {
|
|
@@ -29811,6 +29844,46 @@ Automation "${automationName}" (${id}) deleted.
|
|
|
29811
29844
|
process.exit(1);
|
|
29812
29845
|
}
|
|
29813
29846
|
}
|
|
29847
|
+
async function automationCheckCommand(checkRunId, options) {
|
|
29848
|
+
const id = Number(checkRunId);
|
|
29849
|
+
if (!Number.isSafeInteger(id)) {
|
|
29850
|
+
console.error(chalk17.red("Error: check run ID must be an integer"));
|
|
29851
|
+
process.exit(1);
|
|
29852
|
+
}
|
|
29853
|
+
if (!options.token) {
|
|
29854
|
+
console.error(chalk17.red("Error: --token is required"));
|
|
29855
|
+
process.exit(1);
|
|
29856
|
+
}
|
|
29857
|
+
const { conclusion } = options;
|
|
29858
|
+
if (!isAutomationCheckConclusion(conclusion)) {
|
|
29859
|
+
console.error(chalk17.red(`Error: --conclusion must be one of ${AUTOMATION_CHECK_CONCLUSIONS.join(", ")}`));
|
|
29860
|
+
process.exit(1);
|
|
29861
|
+
}
|
|
29862
|
+
if (!options.title?.trim()) {
|
|
29863
|
+
console.error(chalk17.red("Error: --title is required"));
|
|
29864
|
+
process.exit(1);
|
|
29865
|
+
}
|
|
29866
|
+
const body = {
|
|
29867
|
+
token: options.token,
|
|
29868
|
+
conclusion,
|
|
29869
|
+
title: options.title.trim(),
|
|
29870
|
+
...options.summary?.trim() ? { summary: options.summary.trim() } : {}
|
|
29871
|
+
};
|
|
29872
|
+
try {
|
|
29873
|
+
const response = await orgAuthenticatedFetch(
|
|
29874
|
+
`/v1/automations/checks/${id}`,
|
|
29875
|
+
{ method: "POST", body }
|
|
29876
|
+
);
|
|
29877
|
+
console.log(response.reported ? chalk17.green(`
|
|
29878
|
+
Reported ${conclusion} for "${response.name}".
|
|
29879
|
+
`) : chalk17.yellow(`
|
|
29880
|
+
Skipped "${response.name}" \u2014 a newer run of this automation owns it and will report the verdict.
|
|
29881
|
+
`));
|
|
29882
|
+
} catch (error51) {
|
|
29883
|
+
console.error(chalk17.red(`Error: ${error51 instanceof Error ? error51.message : "Unknown error"}`));
|
|
29884
|
+
process.exit(1);
|
|
29885
|
+
}
|
|
29886
|
+
}
|
|
29814
29887
|
|
|
29815
29888
|
// src/commands/preview.ts
|
|
29816
29889
|
import chalk18 from "chalk";
|
|
@@ -37122,7 +37195,7 @@ program.command("read <id>").description("Read conversation history of a replica
|
|
|
37122
37195
|
}
|
|
37123
37196
|
});
|
|
37124
37197
|
var automation = program.command("automation").alias("auto").description("Manage automations");
|
|
37125
|
-
automation.command("list").description("List all automations").option("-p, --page <page>", "Page number").option("-l, --limit <limit>", "Number of items per page").option("--owner <owner>", "Ownership filter: org, user, all").action(async (options) => {
|
|
37198
|
+
automation.command("list").description("List all automations").option("-p, --page <page>", "Page number").option("-l, --limit <limit>", "Number of items per page").option("--owner <owner>", "Ownership filter: org, user, all").option("--trigger-type <type>", "Only automations with a trigger of this type (cron, github, gitlab, slack, sentry, custom)").option("--enabled <enabled>", "Only enabled or disabled automations (true/false)").option("--search <search>", "Case-insensitive substring match on the name").action(async (options) => {
|
|
37126
37199
|
try {
|
|
37127
37200
|
await automationListCommand(options);
|
|
37128
37201
|
} catch (error51) {
|
|
@@ -37146,7 +37219,7 @@ automation.command("get <id>").description("Get automation details by ID").actio
|
|
|
37146
37219
|
process.exit(1);
|
|
37147
37220
|
}
|
|
37148
37221
|
});
|
|
37149
|
-
automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-e, --environment <environment>", "Environment name or ID").option("--trigger-cron <schedule>", 'Cron schedule expression (e.g. "0 9 * * 1-5")').option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger (default: UTC)").option("--trigger-github <event>", 'GitHub event (e.g. "pull_request.opened")').option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-gitlab <event>", 'GitLab event (e.g. "merge_request.opened")').option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--lifecycle <policy>", "Workspace lifecycle: archive_when_done, sleep_when_done,
|
|
37222
|
+
automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-e, --environment <environment>", "Environment name or ID").option("--trigger-cron <schedule>", 'Cron schedule expression (e.g. "0 9 * * 1-5")').option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger (default: UTC)").option("--trigger-github <event>", 'GitHub event (e.g. "pull_request.opened")').option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-gitlab <event>", 'GitLab event (e.g. "merge_request.opened")').option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (requires a PR opened/updated trigger)").option("--lifecycle <policy>", "Workspace lifecycle: archive_when_done, sleep_when_done, default").option("--sleep-when-done", "Sleep automation workspaces as soon as the agent finishes").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle default)").option("--pr-followups", "Allow follow-up actions on matching PRs").option("--agent-provider <provider>", 'Coding agent to use: claude, codex, cursor, relay (or "none" to inherit org default)').option("--model <model>", 'Model identifier (must be valid for --agent-provider; pass "none" to clear)').option("--thinking-level <level>", 'Thinking/reasoning level: low, medium, high, xhigh, max (or "none" to clear)').option("--plan-mode", "Run automation messages in plan mode").option("--goal-mode", "Set automation messages as Codex goals").option("--fast-mode", "Run automation messages in fast mode").option("--personal", "Create a personal automation owned by the authenticated user").option("--disabled", "Create in disabled state").action(async (name, options) => {
|
|
37150
37223
|
try {
|
|
37151
37224
|
await automationCreateCommand(name, {
|
|
37152
37225
|
...options,
|
|
@@ -37161,7 +37234,7 @@ automation.command("create [name]").description("Create a new automation").optio
|
|
|
37161
37234
|
process.exit(1);
|
|
37162
37235
|
}
|
|
37163
37236
|
});
|
|
37164
|
-
automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("-e, --enabled <enabled>", "Enable or disable (true/false)").option("--trigger-cron <schedule>", "Set cron schedule (replaces existing triggers)").option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger").option("--trigger-github <event>", "Set GitHub event (replaces existing triggers)").option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-gitlab <event>", "Set GitLab event (replaces existing triggers)").option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--environment <environment>", "Environment name or ID").option("--lifecycle <policy>", "Workspace lifecycle: archive_when_done, sleep_when_done,
|
|
37237
|
+
automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("-e, --enabled <enabled>", "Enable or disable (true/false)").option("--trigger-cron <schedule>", "Set cron schedule (replaces existing triggers)").option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger").option("--trigger-github <event>", "Set GitHub event (replaces existing triggers)").option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-gitlab <event>", "Set GitLab event (replaces existing triggers)").option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (replaces the current list; pass empty string to remove them)").option("--add-github-checks <names>", "Comma-separated GitHub check names to add, keeping the ones already configured").option("--environment <environment>", "Environment name or ID").option("--lifecycle <policy>", "Workspace lifecycle: archive_when_done, sleep_when_done, default").option("--sleep-when-done", "Sleep automation workspaces as soon as the agent finishes").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle default)").option("--pr-followups <enabled>", "Allow follow-up actions on matching PRs (true/false)", parseBooleanOption).option("--agent-provider <provider>", 'Coding agent to use: claude, codex, cursor, relay (or "none" to inherit org default)').option("--model <model>", 'Model identifier (must be valid for --agent-provider; pass "none" to clear)').option("--thinking-level <level>", 'Thinking/reasoning level: low, medium, high, xhigh, max (or "none" to clear)').option("--plan-mode <enabled>", "Run automation messages in plan mode (true/false)", parseBooleanOption).option("--goal-mode <enabled>", "Set automation messages as Codex goals (true/false)", parseBooleanOption).option("--fast-mode <enabled>", "Run automation messages in fast mode (true/false)", parseBooleanOption).action(async (id, options) => {
|
|
37165
37238
|
try {
|
|
37166
37239
|
await automationEditCommand(id, options);
|
|
37167
37240
|
} catch (error51) {
|
|
@@ -37197,6 +37270,18 @@ automation.command("delete <id>").description("Delete an automation").option("-f
|
|
|
37197
37270
|
process.exit(1);
|
|
37198
37271
|
}
|
|
37199
37272
|
});
|
|
37273
|
+
automation.command("check <checkRunId>").description("Report this automation run's verdict on one of its GitHub checks").requiredOption("--token <token>", "Ownership token for this check, exactly as given in the prompt").requiredOption("--conclusion <conclusion>", "success or failure").requiredOption("--title <title>", "One-line verdict shown on the check").option("--summary <summary>", "What was checked and why it passed or failed").action(async (checkRunId, options) => {
|
|
37274
|
+
try {
|
|
37275
|
+
await automationCheckCommand(checkRunId, options);
|
|
37276
|
+
} catch (error51) {
|
|
37277
|
+
if (error51 instanceof Error) {
|
|
37278
|
+
console.error(chalk24.red(`
|
|
37279
|
+
\u2717 ${error51.message}
|
|
37280
|
+
`));
|
|
37281
|
+
}
|
|
37282
|
+
process.exit(1);
|
|
37283
|
+
}
|
|
37284
|
+
});
|
|
37200
37285
|
automation.action(async () => {
|
|
37201
37286
|
try {
|
|
37202
37287
|
await automationListCommand({});
|