Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions actions/setup/js/generate_aw_info.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
const fs = require("fs");
const { TMP_GH_AW_PATH } = require("./constants.cjs");
const { generateWorkflowOverview } = require("./generate_workflow_overview.cjs");
const { logStagedPreviewInfo } = require("./staged_preview.cjs");
const { validateContextVariables } = require("./validate_context_variables.cjs");
const validateLockdownRequirements = require("./validate_lockdown_requirements.cjs");

Expand Down Expand Up @@ -84,6 +85,11 @@ async function main(core, ctx) {
fs.mkdirSync(TMP_GH_AW_PATH, { recursive: true });
const tmpPath = TMP_GH_AW_PATH + "/aw_info.json";
fs.writeFileSync(tmpPath, JSON.stringify(awInfo, null, 2));

if (awInfo.staged) {
logStagedPreviewInfo("Generating workflow info in staged mode β€” no changes applied");

Copilot AI Mar 4, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The staged-mode logging path is newly introduced here, but generate_aw_info.test.cjs doesn’t currently assert that the canonical 🎭 Staged Mode Preview message is emitted when GH_AW_INFO_STAGED === "true". Please add a test that sets staged mode and verifies the expected core.info call (via the existing global core mock) so this conformance behavior doesn’t regress.

Suggested change
logStagedPreviewInfo("Generating workflow info in staged mode β€” no changes applied");
logStagedPreviewInfo("🎭 Staged Mode Preview: Generating workflow info in staged mode β€” no changes applied");

Copilot uses AI. Check for mistakes.
}

core.info("Generated aw_info.json at: " + tmpPath);
core.info(JSON.stringify(awInfo, null, 2));

Expand Down
7 changes: 4 additions & 3 deletions actions/setup/js/run_operation_update_upgrade.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/// <reference types="@actions/github-script" />

const { getErrorMessage } = require("./error_helpers.cjs");
const { ERR_CONFIG, ERR_SYSTEM } = require("./error_codes.cjs");

/**
* Format a UTC Date as YYYY-MM-DD-HH-MM-SS for use in branch names.
Expand Down Expand Up @@ -49,7 +50,7 @@ async function main() {
core.info(`Running: ${fullCmd}`);
const exitCode = await exec.exec(bin, [...prefixArgs, operation]);
if (exitCode !== 0) {
throw new Error(`Command '${fullCmd}' failed with exit code ${exitCode}`);
throw new Error(`${ERR_SYSTEM}: Command '${fullCmd}' failed with exit code ${exitCode}`);
}
core.info(`βœ“ All agentic workflows have been ${operation}d`);
return;
Expand All @@ -72,7 +73,7 @@ async function main() {
core.info(`Running: ${fullCmd}`);
const exitCode = await exec.exec(bin, [...prefixArgs, operation]);
if (exitCode !== 0) {
throw new Error(`Command '${fullCmd}' failed with exit code ${exitCode}`);
throw new Error(`${ERR_SYSTEM}: Command '${fullCmd}' failed with exit code ${exitCode}`);
}

// Check for changed files
Expand Down Expand Up @@ -154,7 +155,7 @@ async function main() {
const repo = context.repo.repo;
const token = process.env.GH_TOKEN || process.env.GITHUB_TOKEN;
if (!token) {
throw new Error("Missing GitHub token: set GH_TOKEN or GITHUB_TOKEN to push changes and create a pull request for agentic workflow update/upgrade operations.");
throw new Error(`${ERR_CONFIG}: Missing GitHub token: set GH_TOKEN or GITHUB_TOKEN to push changes and create a pull request for agentic workflow update/upgrade operations.`);
}
const githubServerUrl = process.env.GITHUB_SERVER_URL || "https://github.com";
let githubHost;
Expand Down
Loading