From a9cb084f737694e3f5417c5281db3b548d0fadb0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 16:19:15 +0000 Subject: [PATCH 1/3] Initial plan From f13b4bba0539a70342a3c145d0b5b141cc6ce3ad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 16:26:09 +0000 Subject: [PATCH 2/3] Initial commit: Plan to replace core.debug with core.info Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/mcp-inspector.lock.yml | 216 +++++++++++------------ 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 1f21cc85174..73e6a1ee0f2 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -4716,11 +4716,11 @@ jobs: core.setFailed(`Error processing missing-tool reports: ${error}`); }); - notion_add_comment: + post_to_slack_channel: needs: - agent - detection - if: (always()) && (contains(needs.agent.outputs.output_types, 'notion_add_comment')) + if: (always()) && (contains(needs.agent.outputs.output_types, 'post_to_slack_channel')) runs-on: ubuntu-latest permissions: contents: read @@ -4735,25 +4735,27 @@ jobs: run: | find /tmp/gh-aw/safe-jobs/ -type f -print echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-jobs/agent_output.json" >> $GITHUB_ENV - - name: Add comment to Notion page + - name: Post message to Slack uses: actions/github-script@v8 env: - NOTION_API_TOKEN: ${{ secrets.NOTION_API_TOKEN }} - NOTION_PAGE_ID: ${{ vars.NOTION_PAGE_ID }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_CHANNEL_ID: ${{ env.GH_AW_SLACK_CHANNEL_ID }} with: script: |- const fs = require('fs'); - const notionToken = process.env.NOTION_API_TOKEN; - const pageId = process.env.NOTION_PAGE_ID; + const slackBotToken = process.env.SLACK_BOT_TOKEN; + const slackChannelId = process.env.SLACK_CHANNEL_ID; const isStaged = process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === 'true'; const outputContent = process.env.GITHUB_AW_AGENT_OUTPUT; - if (!notionToken) { - core.setFailed('NOTION_API_TOKEN secret is not configured'); + // Validate required environment variables + if (!slackBotToken) { + core.setFailed('SLACK_BOT_TOKEN secret is not configured. Please add it to your repository secrets.'); return; } - if (!pageId) { - core.setFailed('NOTION_PAGE_ID variable is not set'); + + if (!slackChannelId) { + core.setFailed('GH_AW_SLACK_CHANNEL_ID environment variable is required'); return; } @@ -4777,79 +4779,91 @@ jobs: return; } - // Filter for notion_add_comment items - const notionCommentItems = agentOutputData.items.filter(item => item.type === 'notion_add_comment'); + // Filter for post_to_slack_channel items + const slackMessageItems = agentOutputData.items.filter(item => item.type === 'post_to_slack_channel'); - if (notionCommentItems.length === 0) { - core.info('No notion_add_comment items found in agent output'); + if (slackMessageItems.length === 0) { + core.info('No post_to_slack_channel items found in agent output'); return; } - core.info(`Found ${notionCommentItems.length} notion_add_comment item(s)`); + core.info(`Found ${slackMessageItems.length} post_to_slack_channel item(s)`); - // Process each comment item - for (let i = 0; i < notionCommentItems.length; i++) { - const item = notionCommentItems[i]; - const comment = item.comment; + // Process each message item + for (let i = 0; i < slackMessageItems.length; i++) { + const item = slackMessageItems[i]; + const message = item.message; - if (!comment) { - core.warning(`Item ${i + 1}: Missing comment field, skipping`); + if (!message) { + core.warning(`Item ${i + 1}: Missing message field, skipping`); + continue; + } + + // Validate message length (max 200 characters) + const maxLength = 200; + if (message.length > maxLength) { + core.warning(`Item ${i + 1}: Message length (${message.length} characters) exceeds maximum allowed length of ${maxLength} characters, skipping`); continue; } if (isStaged) { - let summaryContent = "## 🎭 Staged Mode: Notion Comment Preview\n\n"; - summaryContent += "The following comment would be added to Notion if staged mode was disabled:\n\n"; - summaryContent += `**Page ID:** ${pageId}\n\n`; - summaryContent += `**Comment:**\n${comment}\n\n`; + let summaryContent = "## 🎭 Staged Mode: Slack Message Preview\n\n"; + summaryContent += "The following message would be posted to Slack if staged mode was disabled:\n\n"; + summaryContent += `**Channel ID:** ${slackChannelId}\n\n`; + summaryContent += `**Message:** ${message}\n\n`; + summaryContent += `**Message Length:** ${message.length} characters\n\n`; await core.summary.addRaw(summaryContent).write(); - core.info("📝 Notion comment preview written to step summary"); + core.info("📝 Slack message preview written to step summary"); continue; } - core.info(`Adding comment ${i + 1}/${notionCommentItems.length} to Notion page: ${pageId}`); + core.info(`Posting message ${i + 1}/${slackMessageItems.length} to Slack channel: ${slackChannelId}`); + core.info(`Message length: ${message.length} characters`); try { - const response = await fetch('https://api.notion.com/v1/comments', { + const response = await fetch('https://slack.com/api/chat.postMessage', { method: 'POST', headers: { - 'Authorization': `Bearer ${notionToken}`, - 'Notion-Version': '2022-06-28', - 'Content-Type': 'application/json' + 'Content-Type': 'application/json; charset=utf-8', + 'Authorization': `Bearer ${slackBotToken}` }, body: JSON.stringify({ - parent: { - page_id: pageId - }, - rich_text: [{ - type: 'text', - text: { - content: comment - } - }] + channel: slackChannelId, + text: message }) }); + const data = await response.json(); + if (!response.ok) { - const errorData = await response.text(); - core.setFailed(`Notion API error (${response.status}): ${errorData}`); + core.setFailed(`Slack API HTTP error (${response.status}): ${response.statusText}`); return; } - const data = await response.json(); - core.info(`✅ Comment ${i + 1} added successfully`); - core.info(`Comment ID: ${data.id}`); + if (!data.ok) { + core.setFailed(`Slack API error: ${data.error || 'Unknown error'}`); + if (data.error === 'invalid_auth') { + core.error('Authentication failed. Please verify your SLACK_BOT_TOKEN is correct.'); + } else if (data.error === 'channel_not_found') { + core.error('Channel not found. Please verify the GH_AW_SLACK_CHANNEL_ID environment variable is correct and the bot has access to it.'); + } + return; + } + + core.info(`✅ Message ${i + 1} posted successfully to Slack`); + core.info(`Message timestamp: ${data.ts}`); + core.info(`Channel: ${data.channel}`); } catch (error) { - core.setFailed(`Failed to add comment ${i + 1}: ${error instanceof Error ? error.message : String(error)}`); + core.setFailed(`Failed to post message ${i + 1} to Slack: ${error instanceof Error ? error.message : String(error)}`); return; } } - post_to_slack_channel: + notion_add_comment: needs: - agent - detection - if: (always()) && (contains(needs.agent.outputs.output_types, 'post_to_slack_channel')) + if: (always()) && (contains(needs.agent.outputs.output_types, 'notion_add_comment')) runs-on: ubuntu-latest permissions: contents: read @@ -4864,27 +4878,25 @@ jobs: run: | find /tmp/gh-aw/safe-jobs/ -type f -print echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-jobs/agent_output.json" >> $GITHUB_ENV - - name: Post message to Slack + - name: Add comment to Notion page uses: actions/github-script@v8 env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - SLACK_CHANNEL_ID: ${{ env.GH_AW_SLACK_CHANNEL_ID }} + NOTION_API_TOKEN: ${{ secrets.NOTION_API_TOKEN }} + NOTION_PAGE_ID: ${{ vars.NOTION_PAGE_ID }} with: script: |- const fs = require('fs'); - const slackBotToken = process.env.SLACK_BOT_TOKEN; - const slackChannelId = process.env.SLACK_CHANNEL_ID; + const notionToken = process.env.NOTION_API_TOKEN; + const pageId = process.env.NOTION_PAGE_ID; const isStaged = process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === 'true'; const outputContent = process.env.GITHUB_AW_AGENT_OUTPUT; - // Validate required environment variables - if (!slackBotToken) { - core.setFailed('SLACK_BOT_TOKEN secret is not configured. Please add it to your repository secrets.'); + if (!notionToken) { + core.setFailed('NOTION_API_TOKEN secret is not configured'); return; } - - if (!slackChannelId) { - core.setFailed('GH_AW_SLACK_CHANNEL_ID environment variable is required'); + if (!pageId) { + core.setFailed('NOTION_PAGE_ID variable is not set'); return; } @@ -4908,82 +4920,70 @@ jobs: return; } - // Filter for post_to_slack_channel items - const slackMessageItems = agentOutputData.items.filter(item => item.type === 'post_to_slack_channel'); + // Filter for notion_add_comment items + const notionCommentItems = agentOutputData.items.filter(item => item.type === 'notion_add_comment'); - if (slackMessageItems.length === 0) { - core.info('No post_to_slack_channel items found in agent output'); + if (notionCommentItems.length === 0) { + core.info('No notion_add_comment items found in agent output'); return; } - core.info(`Found ${slackMessageItems.length} post_to_slack_channel item(s)`); - - // Process each message item - for (let i = 0; i < slackMessageItems.length; i++) { - const item = slackMessageItems[i]; - const message = item.message; + core.info(`Found ${notionCommentItems.length} notion_add_comment item(s)`); - if (!message) { - core.warning(`Item ${i + 1}: Missing message field, skipping`); - continue; - } + // Process each comment item + for (let i = 0; i < notionCommentItems.length; i++) { + const item = notionCommentItems[i]; + const comment = item.comment; - // Validate message length (max 200 characters) - const maxLength = 200; - if (message.length > maxLength) { - core.warning(`Item ${i + 1}: Message length (${message.length} characters) exceeds maximum allowed length of ${maxLength} characters, skipping`); + if (!comment) { + core.warning(`Item ${i + 1}: Missing comment field, skipping`); continue; } if (isStaged) { - let summaryContent = "## 🎭 Staged Mode: Slack Message Preview\n\n"; - summaryContent += "The following message would be posted to Slack if staged mode was disabled:\n\n"; - summaryContent += `**Channel ID:** ${slackChannelId}\n\n`; - summaryContent += `**Message:** ${message}\n\n`; - summaryContent += `**Message Length:** ${message.length} characters\n\n`; + let summaryContent = "## 🎭 Staged Mode: Notion Comment Preview\n\n"; + summaryContent += "The following comment would be added to Notion if staged mode was disabled:\n\n"; + summaryContent += `**Page ID:** ${pageId}\n\n`; + summaryContent += `**Comment:**\n${comment}\n\n`; await core.summary.addRaw(summaryContent).write(); - core.info("📝 Slack message preview written to step summary"); + core.info("📝 Notion comment preview written to step summary"); continue; } - core.info(`Posting message ${i + 1}/${slackMessageItems.length} to Slack channel: ${slackChannelId}`); - core.info(`Message length: ${message.length} characters`); + core.info(`Adding comment ${i + 1}/${notionCommentItems.length} to Notion page: ${pageId}`); try { - const response = await fetch('https://slack.com/api/chat.postMessage', { + const response = await fetch('https://api.notion.com/v1/comments', { method: 'POST', headers: { - 'Content-Type': 'application/json; charset=utf-8', - 'Authorization': `Bearer ${slackBotToken}` + 'Authorization': `Bearer ${notionToken}`, + 'Notion-Version': '2022-06-28', + 'Content-Type': 'application/json' }, body: JSON.stringify({ - channel: slackChannelId, - text: message + parent: { + page_id: pageId + }, + rich_text: [{ + type: 'text', + text: { + content: comment + } + }] }) }); - const data = await response.json(); - if (!response.ok) { - core.setFailed(`Slack API HTTP error (${response.status}): ${response.statusText}`); - return; - } - - if (!data.ok) { - core.setFailed(`Slack API error: ${data.error || 'Unknown error'}`); - if (data.error === 'invalid_auth') { - core.error('Authentication failed. Please verify your SLACK_BOT_TOKEN is correct.'); - } else if (data.error === 'channel_not_found') { - core.error('Channel not found. Please verify the GH_AW_SLACK_CHANNEL_ID environment variable is correct and the bot has access to it.'); - } + const errorData = await response.text(); + core.setFailed(`Notion API error (${response.status}): ${errorData}`); return; } - core.info(`✅ Message ${i + 1} posted successfully to Slack`); - core.info(`Message timestamp: ${data.ts}`); - core.info(`Channel: ${data.channel}`); + const data = await response.json(); + core.info(`✅ Comment ${i + 1} added successfully`); + core.info(`Comment ID: ${data.id}`); } catch (error) { - core.setFailed(`Failed to post message ${i + 1} to Slack: ${error instanceof Error ? error.message : String(error)}`); + core.setFailed(`Failed to add comment ${i + 1}: ${error instanceof Error ? error.message : String(error)}`); return; } } From 0b424f8f07e695775dbb67d5e44377e6d412b6d1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 16:32:45 +0000 Subject: [PATCH 3/3] Replace core.debug with core.info in all .cjs files and instructions Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../github-script.instructions.md | 1 - .github/workflows/artifacts-summary.lock.yml | 32 +-- .github/workflows/audit-workflows.lock.yml | 28 +- .github/workflows/brave.lock.yml | 32 +-- .../workflows/changeset-generator.lock.yml | 28 +- .github/workflows/ci-doctor.lock.yml | 20 +- .../workflows/cli-version-checker.lock.yml | 46 ++-- .github/workflows/daily-doc-updater.lock.yml | 46 ++-- .github/workflows/daily-news.lock.yml | 32 +-- .github/workflows/dev.lock.yml | 28 +- .../duplicate-code-detector.lock.yml | 28 +- .../example-workflow-analyzer.lock.yml | 24 +- .../github-mcp-tools-report.lock.yml | 50 ++-- .../workflows/go-pattern-detector.lock.yml | 24 +- .github/workflows/issue-classifier.lock.yml | 26 +- .github/workflows/lockfile-stats.lock.yml | 28 +- .github/workflows/mcp-inspector.lock.yml | 248 +++++++++--------- .../workflows/notion-issue-summary.lock.yml | 28 +- .github/workflows/pdf-summary.lock.yml | 32 +-- .github/workflows/plan.lock.yml | 32 +-- .github/workflows/poem-bot.lock.yml | 68 ++--- .github/workflows/q.lock.yml | 54 ++-- .github/workflows/repo-tree-map.lock.yml | 32 +-- .github/workflows/research.lock.yml | 32 +-- .github/workflows/scout.lock.yml | 32 +-- .github/workflows/security-fix-pr.lock.yml | 46 ++-- .github/workflows/smoke-claude.lock.yml | 24 +- .github/workflows/smoke-codex.lock.yml | 28 +- .github/workflows/smoke-copilot.lock.yml | 28 +- .github/workflows/smoke-genaiscript.lock.yml | 8 +- .github/workflows/smoke-opencode.lock.yml | 8 +- .../workflows/technical-doc-writer.lock.yml | 46 ++-- .github/workflows/tidy.lock.yml | 50 ++-- .github/workflows/unbloat-docs.lock.yml | 46 ++-- pkg/workflow/js/add_labels.cjs | 14 +- pkg/workflow/js/add_labels.test.cjs | 22 +- pkg/workflow/js/check_membership.cjs | 8 +- pkg/workflow/js/check_permissions.cjs | 6 +- pkg/workflow/js/check_permissions.test.cjs | 14 +- pkg/workflow/js/compute_text.cjs | 4 +- pkg/workflow/js/create_discussion.cjs | 4 +- pkg/workflow/js/create_discussion.test.cjs | 2 +- pkg/workflow/js/create_pull_request.cjs | 22 +- pkg/workflow/js/redact_secrets.cjs | 4 +- pkg/workflow/js/redact_secrets.test.cjs | 8 +- pkg/workflow/js/validate_errors.cjs | 16 +- pkg/workflow/js/validate_errors.test.cjs | 6 +- 47 files changed, 722 insertions(+), 723 deletions(-) diff --git a/.github/instructions/github-script.instructions.md b/.github/instructions/github-script.instructions.md index 93769850295..0df06371796 100644 --- a/.github/instructions/github-script.instructions.md +++ b/.github/instructions/github-script.instructions.md @@ -13,7 +13,6 @@ This JavaScript file will be run using the GitHub Action `actions/github-script@ ## Best practices - use `core.info`, `core.warning`, `core.error` for logging, not `console.log` or `console.error` -- use `core.debug` for verbose debug logging, which can be enabled in action settings - use `core.setOutput` to set action outputs - use `core.exportVariable` to set environment variables for subsequent steps - use `core.getInput` to get action inputs, with `required: true` for mandatory inputs diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index bfc4cac7c8c..1cc52e38825 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -64,7 +64,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -83,15 +83,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2181,7 +2181,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2199,7 +2199,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3030,14 +3030,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3048,7 +3048,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3063,7 +3063,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3120,13 +3120,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3170,11 +3170,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3453,7 +3453,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -3470,7 +3470,7 @@ jobs: core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index 92cfc29ab8d..c68fcdf501b 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -68,7 +68,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -87,15 +87,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2892,14 +2892,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2910,7 +2910,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2925,7 +2925,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2982,13 +2982,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3032,11 +3032,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3327,7 +3327,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -3344,7 +3344,7 @@ jobs: core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index 181dacd1221..40b87174ce8 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -76,7 +76,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -95,15 +95,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -264,7 +264,7 @@ jobs: username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); return; @@ -323,7 +323,7 @@ jobs: break; } const sanitizedText = sanitizeContent(text); - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); core.setOutput("text", sanitizedText); } await main(); @@ -2922,7 +2922,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2940,7 +2940,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3789,14 +3789,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3807,7 +3807,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3822,7 +3822,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3879,13 +3879,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3929,11 +3929,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/changeset-generator.lock.yml b/.github/workflows/changeset-generator.lock.yml index c7f3c7d41a6..24f075078fd 100644 --- a/.github/workflows/changeset-generator.lock.yml +++ b/.github/workflows/changeset-generator.lock.yml @@ -70,7 +70,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -89,15 +89,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -257,7 +257,7 @@ jobs: username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); return; @@ -316,7 +316,7 @@ jobs: break; } const sanitizedText = sanitizeContent(text); - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); core.setOutput("text", sanitizedText); } await main(); @@ -3199,14 +3199,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3217,7 +3217,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3232,7 +3232,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3289,13 +3289,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3339,11 +3339,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml index b42bb032865..8100b5f65cb 100644 --- a/.github/workflows/ci-doctor.lock.yml +++ b/.github/workflows/ci-doctor.lock.yml @@ -2266,7 +2266,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2284,7 +2284,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3115,14 +3115,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3133,7 +3133,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3148,7 +3148,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3205,13 +3205,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3255,11 +3255,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/cli-version-checker.lock.yml b/.github/workflows/cli-version-checker.lock.yml index d661d898f75..13167b0ee1c 100644 --- a/.github/workflows/cli-version-checker.lock.yml +++ b/.github/workflows/cli-version-checker.lock.yml @@ -64,7 +64,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -83,15 +83,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2685,14 +2685,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2703,7 +2703,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2718,7 +2718,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2775,13 +2775,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -2825,11 +2825,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3341,7 +3341,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -3363,7 +3363,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -3414,23 +3414,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -3445,7 +3445,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index 0feb950662c..85526ca5b96 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -64,7 +64,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -83,15 +83,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2827,14 +2827,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2845,7 +2845,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2860,7 +2860,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2917,13 +2917,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -2967,11 +2967,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3483,7 +3483,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -3505,7 +3505,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -3556,23 +3556,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -3587,7 +3587,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index b687efacaea..3d35b894467 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -68,7 +68,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -87,15 +87,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2195,7 +2195,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2213,7 +2213,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3045,14 +3045,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3063,7 +3063,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3078,7 +3078,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3135,13 +3135,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3185,11 +3185,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3468,7 +3468,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -3485,7 +3485,7 @@ jobs: core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index f5424e81d6c..980eb224b9f 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -105,7 +105,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -124,15 +124,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2581,7 +2581,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2599,7 +2599,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3430,14 +3430,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3448,7 +3448,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3463,7 +3463,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3520,13 +3520,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3570,11 +3570,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/duplicate-code-detector.lock.yml b/.github/workflows/duplicate-code-detector.lock.yml index cd151f14a43..b931c1d0889 100644 --- a/.github/workflows/duplicate-code-detector.lock.yml +++ b/.github/workflows/duplicate-code-detector.lock.yml @@ -68,7 +68,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -87,15 +87,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2256,7 +2256,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2274,7 +2274,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -2643,14 +2643,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2661,7 +2661,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2676,7 +2676,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2733,13 +2733,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -2783,11 +2783,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/example-workflow-analyzer.lock.yml b/.github/workflows/example-workflow-analyzer.lock.yml index e7ad75cea59..b1b4388b5f3 100644 --- a/.github/workflows/example-workflow-analyzer.lock.yml +++ b/.github/workflows/example-workflow-analyzer.lock.yml @@ -64,7 +64,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -83,15 +83,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2603,14 +2603,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2621,7 +2621,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2636,7 +2636,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2693,13 +2693,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -2743,11 +2743,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/github-mcp-tools-report.lock.yml b/.github/workflows/github-mcp-tools-report.lock.yml index dd8b39c55d4..6ac366cd108 100644 --- a/.github/workflows/github-mcp-tools-report.lock.yml +++ b/.github/workflows/github-mcp-tools-report.lock.yml @@ -67,7 +67,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -86,15 +86,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -3020,14 +3020,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3038,7 +3038,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3053,7 +3053,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3110,13 +3110,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3160,11 +3160,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3545,7 +3545,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -3562,7 +3562,7 @@ jobs: core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; @@ -3903,7 +3903,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -3925,7 +3925,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -3976,23 +3976,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -4007,7 +4007,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); diff --git a/.github/workflows/go-pattern-detector.lock.yml b/.github/workflows/go-pattern-detector.lock.yml index e30c58a0c3f..c70502f1df0 100644 --- a/.github/workflows/go-pattern-detector.lock.yml +++ b/.github/workflows/go-pattern-detector.lock.yml @@ -71,7 +71,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -90,15 +90,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2720,14 +2720,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2738,7 +2738,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2753,7 +2753,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2810,13 +2810,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -2860,11 +2860,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/issue-classifier.lock.yml b/.github/workflows/issue-classifier.lock.yml index b3a42870bae..fbbdb32efd7 100644 --- a/.github/workflows/issue-classifier.lock.yml +++ b/.github/workflows/issue-classifier.lock.yml @@ -68,7 +68,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -87,15 +87,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -254,7 +254,7 @@ jobs: username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); return; @@ -313,7 +313,7 @@ jobs: break; } const sanitizedText = sanitizeContent(text); - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); core.setOutput("text", sanitizedText); } await main(); @@ -2693,7 +2693,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -2710,7 +2710,7 @@ jobs: core.warning("No add-labels item found in agent output"); return; } - core.debug(`Found add-labels item with ${labelsItem.labels.length} labels`); + core.info(`Found add-labels item with ${labelsItem.labels.length} labels`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Add Labels Preview\n\n"; summaryContent += "The following labels would be added if staged mode was disabled:\n\n"; @@ -2734,9 +2734,9 @@ jobs: .filter(label => label) : undefined; if (allowedLabels) { - core.debug(`Allowed labels: ${JSON.stringify(allowedLabels)}`); + core.info(`Allowed labels: ${JSON.stringify(allowedLabels)}`); } else { - core.debug("No label restrictions - any labels are allowed"); + core.info("No label restrictions - any labels are allowed"); } const maxCountEnv = process.env.GITHUB_AW_LABELS_MAX_COUNT; const maxCount = maxCountEnv ? parseInt(maxCountEnv, 10) : 3; @@ -2744,7 +2744,7 @@ jobs: core.setFailed(`Invalid max value: ${maxCountEnv}. Must be a positive integer`); return; } - core.debug(`Max count: ${maxCount}`); + core.info(`Max count: ${maxCount}`); const labelsTarget = process.env.GITHUB_AW_LABELS_TARGET || "triggering"; core.info(`Labels target configuration: ${labelsTarget}`); const isIssueContext = context.eventName === "issues" || context.eventName === "issue_comment"; @@ -2801,7 +2801,7 @@ jobs: return; } const requestedLabels = labelsItem.labels || []; - core.debug(`Requested labels: ${JSON.stringify(requestedLabels)}`); + core.info(`Requested labels: ${JSON.stringify(requestedLabels)}`); for (const label of requestedLabels) { if (label && typeof label === "string" && label.startsWith("-")) { core.setFailed(`Label removal is not permitted. Found line starting with '-': ${label}`); @@ -2823,7 +2823,7 @@ jobs: .map(label => (label.length > 64 ? label.substring(0, 64) : label)) .filter((label, index, arr) => arr.indexOf(label) === index); if (uniqueLabels.length > maxCount) { - core.debug(`too many labels, keep ${maxCount}`); + core.info(`too many labels, keep ${maxCount}`); uniqueLabels = uniqueLabels.slice(0, maxCount); } if (uniqueLabels.length === 0) { diff --git a/.github/workflows/lockfile-stats.lock.yml b/.github/workflows/lockfile-stats.lock.yml index b01136c5c37..07ea84ddfa0 100644 --- a/.github/workflows/lockfile-stats.lock.yml +++ b/.github/workflows/lockfile-stats.lock.yml @@ -64,7 +64,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -83,15 +83,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2955,14 +2955,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2973,7 +2973,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2988,7 +2988,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3045,13 +3045,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3095,11 +3095,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3390,7 +3390,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -3407,7 +3407,7 @@ jobs: core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 73e6a1ee0f2..7a9fb4dced4 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -89,7 +89,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -108,15 +108,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -3102,7 +3102,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -3120,7 +3120,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3992,14 +3992,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -4010,7 +4010,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -4025,7 +4025,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -4082,13 +4082,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -4132,11 +4132,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -4415,7 +4415,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -4432,7 +4432,7 @@ jobs: core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; @@ -4716,11 +4716,11 @@ jobs: core.setFailed(`Error processing missing-tool reports: ${error}`); }); - post_to_slack_channel: + notion_add_comment: needs: - agent - detection - if: (always()) && (contains(needs.agent.outputs.output_types, 'post_to_slack_channel')) + if: (always()) && (contains(needs.agent.outputs.output_types, 'notion_add_comment')) runs-on: ubuntu-latest permissions: contents: read @@ -4735,27 +4735,25 @@ jobs: run: | find /tmp/gh-aw/safe-jobs/ -type f -print echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-jobs/agent_output.json" >> $GITHUB_ENV - - name: Post message to Slack + - name: Add comment to Notion page uses: actions/github-script@v8 env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - SLACK_CHANNEL_ID: ${{ env.GH_AW_SLACK_CHANNEL_ID }} + NOTION_API_TOKEN: ${{ secrets.NOTION_API_TOKEN }} + NOTION_PAGE_ID: ${{ vars.NOTION_PAGE_ID }} with: script: |- const fs = require('fs'); - const slackBotToken = process.env.SLACK_BOT_TOKEN; - const slackChannelId = process.env.SLACK_CHANNEL_ID; + const notionToken = process.env.NOTION_API_TOKEN; + const pageId = process.env.NOTION_PAGE_ID; const isStaged = process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === 'true'; const outputContent = process.env.GITHUB_AW_AGENT_OUTPUT; - // Validate required environment variables - if (!slackBotToken) { - core.setFailed('SLACK_BOT_TOKEN secret is not configured. Please add it to your repository secrets.'); + if (!notionToken) { + core.setFailed('NOTION_API_TOKEN secret is not configured'); return; } - - if (!slackChannelId) { - core.setFailed('GH_AW_SLACK_CHANNEL_ID environment variable is required'); + if (!pageId) { + core.setFailed('NOTION_PAGE_ID variable is not set'); return; } @@ -4779,91 +4777,79 @@ jobs: return; } - // Filter for post_to_slack_channel items - const slackMessageItems = agentOutputData.items.filter(item => item.type === 'post_to_slack_channel'); + // Filter for notion_add_comment items + const notionCommentItems = agentOutputData.items.filter(item => item.type === 'notion_add_comment'); - if (slackMessageItems.length === 0) { - core.info('No post_to_slack_channel items found in agent output'); + if (notionCommentItems.length === 0) { + core.info('No notion_add_comment items found in agent output'); return; } - core.info(`Found ${slackMessageItems.length} post_to_slack_channel item(s)`); - - // Process each message item - for (let i = 0; i < slackMessageItems.length; i++) { - const item = slackMessageItems[i]; - const message = item.message; + core.info(`Found ${notionCommentItems.length} notion_add_comment item(s)`); - if (!message) { - core.warning(`Item ${i + 1}: Missing message field, skipping`); - continue; - } + // Process each comment item + for (let i = 0; i < notionCommentItems.length; i++) { + const item = notionCommentItems[i]; + const comment = item.comment; - // Validate message length (max 200 characters) - const maxLength = 200; - if (message.length > maxLength) { - core.warning(`Item ${i + 1}: Message length (${message.length} characters) exceeds maximum allowed length of ${maxLength} characters, skipping`); + if (!comment) { + core.warning(`Item ${i + 1}: Missing comment field, skipping`); continue; } if (isStaged) { - let summaryContent = "## 🎭 Staged Mode: Slack Message Preview\n\n"; - summaryContent += "The following message would be posted to Slack if staged mode was disabled:\n\n"; - summaryContent += `**Channel ID:** ${slackChannelId}\n\n`; - summaryContent += `**Message:** ${message}\n\n`; - summaryContent += `**Message Length:** ${message.length} characters\n\n`; + let summaryContent = "## 🎭 Staged Mode: Notion Comment Preview\n\n"; + summaryContent += "The following comment would be added to Notion if staged mode was disabled:\n\n"; + summaryContent += `**Page ID:** ${pageId}\n\n`; + summaryContent += `**Comment:**\n${comment}\n\n`; await core.summary.addRaw(summaryContent).write(); - core.info("📝 Slack message preview written to step summary"); + core.info("📝 Notion comment preview written to step summary"); continue; } - core.info(`Posting message ${i + 1}/${slackMessageItems.length} to Slack channel: ${slackChannelId}`); - core.info(`Message length: ${message.length} characters`); + core.info(`Adding comment ${i + 1}/${notionCommentItems.length} to Notion page: ${pageId}`); try { - const response = await fetch('https://slack.com/api/chat.postMessage', { + const response = await fetch('https://api.notion.com/v1/comments', { method: 'POST', headers: { - 'Content-Type': 'application/json; charset=utf-8', - 'Authorization': `Bearer ${slackBotToken}` + 'Authorization': `Bearer ${notionToken}`, + 'Notion-Version': '2022-06-28', + 'Content-Type': 'application/json' }, body: JSON.stringify({ - channel: slackChannelId, - text: message + parent: { + page_id: pageId + }, + rich_text: [{ + type: 'text', + text: { + content: comment + } + }] }) }); - const data = await response.json(); - if (!response.ok) { - core.setFailed(`Slack API HTTP error (${response.status}): ${response.statusText}`); - return; - } - - if (!data.ok) { - core.setFailed(`Slack API error: ${data.error || 'Unknown error'}`); - if (data.error === 'invalid_auth') { - core.error('Authentication failed. Please verify your SLACK_BOT_TOKEN is correct.'); - } else if (data.error === 'channel_not_found') { - core.error('Channel not found. Please verify the GH_AW_SLACK_CHANNEL_ID environment variable is correct and the bot has access to it.'); - } + const errorData = await response.text(); + core.setFailed(`Notion API error (${response.status}): ${errorData}`); return; } - core.info(`✅ Message ${i + 1} posted successfully to Slack`); - core.info(`Message timestamp: ${data.ts}`); - core.info(`Channel: ${data.channel}`); + const data = await response.json(); + core.info(`✅ Comment ${i + 1} added successfully`); + core.info(`Comment ID: ${data.id}`); } catch (error) { - core.setFailed(`Failed to post message ${i + 1} to Slack: ${error instanceof Error ? error.message : String(error)}`); + core.setFailed(`Failed to add comment ${i + 1}: ${error instanceof Error ? error.message : String(error)}`); return; } } - notion_add_comment: + post_to_slack_channel: needs: - agent - detection - if: (always()) && (contains(needs.agent.outputs.output_types, 'notion_add_comment')) + if: (always()) && (contains(needs.agent.outputs.output_types, 'post_to_slack_channel')) runs-on: ubuntu-latest permissions: contents: read @@ -4878,25 +4864,27 @@ jobs: run: | find /tmp/gh-aw/safe-jobs/ -type f -print echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-jobs/agent_output.json" >> $GITHUB_ENV - - name: Add comment to Notion page + - name: Post message to Slack uses: actions/github-script@v8 env: - NOTION_API_TOKEN: ${{ secrets.NOTION_API_TOKEN }} - NOTION_PAGE_ID: ${{ vars.NOTION_PAGE_ID }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_CHANNEL_ID: ${{ env.GH_AW_SLACK_CHANNEL_ID }} with: script: |- const fs = require('fs'); - const notionToken = process.env.NOTION_API_TOKEN; - const pageId = process.env.NOTION_PAGE_ID; + const slackBotToken = process.env.SLACK_BOT_TOKEN; + const slackChannelId = process.env.SLACK_CHANNEL_ID; const isStaged = process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === 'true'; const outputContent = process.env.GITHUB_AW_AGENT_OUTPUT; - if (!notionToken) { - core.setFailed('NOTION_API_TOKEN secret is not configured'); + // Validate required environment variables + if (!slackBotToken) { + core.setFailed('SLACK_BOT_TOKEN secret is not configured. Please add it to your repository secrets.'); return; } - if (!pageId) { - core.setFailed('NOTION_PAGE_ID variable is not set'); + + if (!slackChannelId) { + core.setFailed('GH_AW_SLACK_CHANNEL_ID environment variable is required'); return; } @@ -4920,70 +4908,82 @@ jobs: return; } - // Filter for notion_add_comment items - const notionCommentItems = agentOutputData.items.filter(item => item.type === 'notion_add_comment'); + // Filter for post_to_slack_channel items + const slackMessageItems = agentOutputData.items.filter(item => item.type === 'post_to_slack_channel'); - if (notionCommentItems.length === 0) { - core.info('No notion_add_comment items found in agent output'); + if (slackMessageItems.length === 0) { + core.info('No post_to_slack_channel items found in agent output'); return; } - core.info(`Found ${notionCommentItems.length} notion_add_comment item(s)`); + core.info(`Found ${slackMessageItems.length} post_to_slack_channel item(s)`); - // Process each comment item - for (let i = 0; i < notionCommentItems.length; i++) { - const item = notionCommentItems[i]; - const comment = item.comment; + // Process each message item + for (let i = 0; i < slackMessageItems.length; i++) { + const item = slackMessageItems[i]; + const message = item.message; - if (!comment) { - core.warning(`Item ${i + 1}: Missing comment field, skipping`); + if (!message) { + core.warning(`Item ${i + 1}: Missing message field, skipping`); + continue; + } + + // Validate message length (max 200 characters) + const maxLength = 200; + if (message.length > maxLength) { + core.warning(`Item ${i + 1}: Message length (${message.length} characters) exceeds maximum allowed length of ${maxLength} characters, skipping`); continue; } if (isStaged) { - let summaryContent = "## 🎭 Staged Mode: Notion Comment Preview\n\n"; - summaryContent += "The following comment would be added to Notion if staged mode was disabled:\n\n"; - summaryContent += `**Page ID:** ${pageId}\n\n`; - summaryContent += `**Comment:**\n${comment}\n\n`; + let summaryContent = "## 🎭 Staged Mode: Slack Message Preview\n\n"; + summaryContent += "The following message would be posted to Slack if staged mode was disabled:\n\n"; + summaryContent += `**Channel ID:** ${slackChannelId}\n\n`; + summaryContent += `**Message:** ${message}\n\n`; + summaryContent += `**Message Length:** ${message.length} characters\n\n`; await core.summary.addRaw(summaryContent).write(); - core.info("📝 Notion comment preview written to step summary"); + core.info("📝 Slack message preview written to step summary"); continue; } - core.info(`Adding comment ${i + 1}/${notionCommentItems.length} to Notion page: ${pageId}`); + core.info(`Posting message ${i + 1}/${slackMessageItems.length} to Slack channel: ${slackChannelId}`); + core.info(`Message length: ${message.length} characters`); try { - const response = await fetch('https://api.notion.com/v1/comments', { + const response = await fetch('https://slack.com/api/chat.postMessage', { method: 'POST', headers: { - 'Authorization': `Bearer ${notionToken}`, - 'Notion-Version': '2022-06-28', - 'Content-Type': 'application/json' + 'Content-Type': 'application/json; charset=utf-8', + 'Authorization': `Bearer ${slackBotToken}` }, body: JSON.stringify({ - parent: { - page_id: pageId - }, - rich_text: [{ - type: 'text', - text: { - content: comment - } - }] + channel: slackChannelId, + text: message }) }); + const data = await response.json(); + if (!response.ok) { - const errorData = await response.text(); - core.setFailed(`Notion API error (${response.status}): ${errorData}`); + core.setFailed(`Slack API HTTP error (${response.status}): ${response.statusText}`); return; } - const data = await response.json(); - core.info(`✅ Comment ${i + 1} added successfully`); - core.info(`Comment ID: ${data.id}`); + if (!data.ok) { + core.setFailed(`Slack API error: ${data.error || 'Unknown error'}`); + if (data.error === 'invalid_auth') { + core.error('Authentication failed. Please verify your SLACK_BOT_TOKEN is correct.'); + } else if (data.error === 'channel_not_found') { + core.error('Channel not found. Please verify the GH_AW_SLACK_CHANNEL_ID environment variable is correct and the bot has access to it.'); + } + return; + } + + core.info(`✅ Message ${i + 1} posted successfully to Slack`); + core.info(`Message timestamp: ${data.ts}`); + core.info(`Channel: ${data.channel}`); } catch (error) { - core.setFailed(`Failed to add comment ${i + 1}: ${error instanceof Error ? error.message : String(error)}`); + core.setFailed(`Failed to post message ${i + 1} to Slack: ${error instanceof Error ? error.message : String(error)}`); return; } } diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index 3c2602cf4ad..013bf634859 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -65,7 +65,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -84,15 +84,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2158,7 +2158,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2176,7 +2176,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3008,14 +3008,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3026,7 +3026,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3041,7 +3041,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3098,13 +3098,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3148,11 +3148,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index e876a57161d..e1645d0c04b 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -95,7 +95,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -114,15 +114,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -285,7 +285,7 @@ jobs: username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); return; @@ -344,7 +344,7 @@ jobs: break; } const sanitizedText = sanitizeContent(text); - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); core.setOutput("text", sanitizedText); } await main(); @@ -2893,7 +2893,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2911,7 +2911,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3742,14 +3742,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3760,7 +3760,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3775,7 +3775,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3832,13 +3832,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3882,11 +3882,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index f087bebafc5..e903ca0f36a 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -67,7 +67,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -86,15 +86,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -255,7 +255,7 @@ jobs: username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); return; @@ -314,7 +314,7 @@ jobs: break; } const sanitizedText = sanitizeContent(text); - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); core.setOutput("text", sanitizedText); } await main(); @@ -2770,7 +2770,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2788,7 +2788,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3619,14 +3619,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3637,7 +3637,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3652,7 +3652,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3709,13 +3709,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3759,11 +3759,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 2780fc524c5..29afe1774bd 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -108,7 +108,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -127,15 +127,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -296,7 +296,7 @@ jobs: username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); return; @@ -355,7 +355,7 @@ jobs: break; } const sanitizedText = sanitizeContent(text); - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); core.setOutput("text", sanitizedText); } await main(); @@ -2880,7 +2880,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2898,7 +2898,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3736,14 +3736,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3754,7 +3754,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3769,7 +3769,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3826,13 +3826,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3876,11 +3876,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -5254,7 +5254,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -5276,7 +5276,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -5327,23 +5327,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -5358,7 +5358,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); @@ -5581,7 +5581,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -5598,7 +5598,7 @@ jobs: core.warning("No add-labels item found in agent output"); return; } - core.debug(`Found add-labels item with ${labelsItem.labels.length} labels`); + core.info(`Found add-labels item with ${labelsItem.labels.length} labels`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Add Labels Preview\n\n"; summaryContent += "The following labels would be added if staged mode was disabled:\n\n"; @@ -5622,9 +5622,9 @@ jobs: .filter(label => label) : undefined; if (allowedLabels) { - core.debug(`Allowed labels: ${JSON.stringify(allowedLabels)}`); + core.info(`Allowed labels: ${JSON.stringify(allowedLabels)}`); } else { - core.debug("No label restrictions - any labels are allowed"); + core.info("No label restrictions - any labels are allowed"); } const maxCountEnv = process.env.GITHUB_AW_LABELS_MAX_COUNT; const maxCount = maxCountEnv ? parseInt(maxCountEnv, 10) : 3; @@ -5632,7 +5632,7 @@ jobs: core.setFailed(`Invalid max value: ${maxCountEnv}. Must be a positive integer`); return; } - core.debug(`Max count: ${maxCount}`); + core.info(`Max count: ${maxCount}`); const labelsTarget = process.env.GITHUB_AW_LABELS_TARGET || "triggering"; core.info(`Labels target configuration: ${labelsTarget}`); const isIssueContext = context.eventName === "issues" || context.eventName === "issue_comment"; @@ -5689,7 +5689,7 @@ jobs: return; } const requestedLabels = labelsItem.labels || []; - core.debug(`Requested labels: ${JSON.stringify(requestedLabels)}`); + core.info(`Requested labels: ${JSON.stringify(requestedLabels)}`); for (const label of requestedLabels) { if (label && typeof label === "string" && label.startsWith("-")) { core.setFailed(`Label removal is not permitted. Found line starting with '-': ${label}`); @@ -5711,7 +5711,7 @@ jobs: .map(label => (label.length > 64 ? label.substring(0, 64) : label)) .filter((label, index, arr) => arr.indexOf(label) === index); if (uniqueLabels.length > maxCount) { - core.debug(`too many labels, keep ${maxCount}`); + core.info(`too many labels, keep ${maxCount}`); uniqueLabels = uniqueLabels.slice(0, maxCount); } if (uniqueLabels.length === 0) { diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 680baca46ab..02c55133881 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -113,7 +113,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -132,15 +132,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -307,7 +307,7 @@ jobs: username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); return; @@ -366,7 +366,7 @@ jobs: break; } const sanitizedText = sanitizeContent(text); - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); core.setOutput("text", sanitizedText); } await main(); @@ -3197,7 +3197,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -3215,7 +3215,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -4047,14 +4047,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -4065,7 +4065,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -4080,7 +4080,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -4137,13 +4137,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -4187,11 +4187,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -4996,7 +4996,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -5018,7 +5018,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -5069,23 +5069,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -5100,7 +5100,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index 092e55ae0da..8bf0d535cfc 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -62,7 +62,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -81,15 +81,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2201,7 +2201,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2219,7 +2219,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3050,14 +3050,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3068,7 +3068,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3083,7 +3083,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3140,13 +3140,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3190,11 +3190,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3473,7 +3473,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -3490,7 +3490,7 @@ jobs: core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index fb20c0dd3a0..17c7f89523c 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -71,7 +71,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -90,15 +90,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2176,7 +2176,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2194,7 +2194,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3026,14 +3026,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3044,7 +3044,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3059,7 +3059,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3116,13 +3116,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3166,11 +3166,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3449,7 +3449,7 @@ jobs: core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -3466,7 +3466,7 @@ jobs: core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; diff --git a/.github/workflows/scout.lock.yml b/.github/workflows/scout.lock.yml index 649460d412e..e6667056517 100644 --- a/.github/workflows/scout.lock.yml +++ b/.github/workflows/scout.lock.yml @@ -121,7 +121,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -140,15 +140,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -319,7 +319,7 @@ jobs: username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); return; @@ -378,7 +378,7 @@ jobs: break; } const sanitizedText = sanitizeContent(text); - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); core.setOutput("text", sanitizedText); } await main(); @@ -3291,7 +3291,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -3309,7 +3309,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -4165,14 +4165,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -4183,7 +4183,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -4198,7 +4198,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -4255,13 +4255,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -4305,11 +4305,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/security-fix-pr.lock.yml b/.github/workflows/security-fix-pr.lock.yml index 1003025fd27..3bdb2003c1e 100644 --- a/.github/workflows/security-fix-pr.lock.yml +++ b/.github/workflows/security-fix-pr.lock.yml @@ -62,7 +62,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -81,15 +81,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2772,14 +2772,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2790,7 +2790,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2805,7 +2805,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2862,13 +2862,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -2912,11 +2912,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3428,7 +3428,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -3450,7 +3450,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -3501,23 +3501,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -3532,7 +3532,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index f85133750e9..e4861737f55 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -62,7 +62,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -81,15 +81,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2562,14 +2562,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2580,7 +2580,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2595,7 +2595,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2652,13 +2652,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -2702,11 +2702,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index 7a13a3b4731..6757f8b0844 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -62,7 +62,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -81,15 +81,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2003,7 +2003,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2021,7 +2021,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -2390,14 +2390,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2408,7 +2408,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2423,7 +2423,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2480,13 +2480,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -2530,11 +2530,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 91dba6d4c1f..d57caf5c9de 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -62,7 +62,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -81,15 +81,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2127,7 +2127,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2145,7 +2145,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -2976,14 +2976,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2994,7 +2994,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3009,7 +3009,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3066,13 +3066,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3116,11 +3116,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { diff --git a/.github/workflows/smoke-genaiscript.lock.yml b/.github/workflows/smoke-genaiscript.lock.yml index e0050fc5515..d763eed343e 100644 --- a/.github/workflows/smoke-genaiscript.lock.yml +++ b/.github/workflows/smoke-genaiscript.lock.yml @@ -66,7 +66,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -85,15 +85,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { diff --git a/.github/workflows/smoke-opencode.lock.yml b/.github/workflows/smoke-opencode.lock.yml index d6bb2177e8e..847206aea48 100644 --- a/.github/workflows/smoke-opencode.lock.yml +++ b/.github/workflows/smoke-opencode.lock.yml @@ -66,7 +66,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -85,15 +85,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index d6671842613..cf3e5ca659f 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -80,7 +80,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -99,15 +99,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2876,14 +2876,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -2894,7 +2894,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -2909,7 +2909,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -2966,13 +2966,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3016,11 +3016,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -3837,7 +3837,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -3859,7 +3859,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -3910,23 +3910,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -3941,7 +3941,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index 6636b715d75..3bbfbd5a9ce 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -81,7 +81,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -100,15 +100,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -2644,7 +2644,7 @@ jobs: if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -2662,7 +2662,7 @@ jobs: const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { @@ -3493,14 +3493,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3511,7 +3511,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3526,7 +3526,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3583,13 +3583,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3633,11 +3633,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -4137,7 +4137,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -4159,7 +4159,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -4210,23 +4210,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -4241,7 +4241,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index 858adb57231..842b54742bc 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -84,7 +84,7 @@ jobs: return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events const safeEvents = ["workflow_run", "schedule"]; @@ -103,15 +103,15 @@ jobs: } // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, repo: repo, username: actor, }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { if (permission === requiredPerm || (requiredPerm === "maintainer" && permission === "maintain")) { @@ -3352,14 +3352,14 @@ jobs: function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { const logPath = process.env.GITHUB_AW_AGENT_OUTPUT; if (!logPath) { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); core.info("No logs to validate - skipping error validation"); @@ -3370,7 +3370,7 @@ jobs: throw new Error("GITHUB_AW_ERROR_PATTERNS environment variable is required and must contain at least one pattern"); } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; const stat = fs.statSync(logPath); if (stat.isDirectory()) { @@ -3385,7 +3385,7 @@ jobs: for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; if (content.length > 0 && !content.endsWith("\n")) { content += "\n"; @@ -3442,13 +3442,13 @@ jobs: let hasErrors = false; const MAX_ITERATIONS_PER_LINE = 10000; const ITERATION_WARNING_THRESHOLD = 1000; - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -3492,11 +3492,11 @@ jobs: } } if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } function extractLevel(match, pattern) { @@ -4313,7 +4313,7 @@ jobs: return; } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -4335,7 +4335,7 @@ jobs: core.warning("No create-pull-request item found in agent output"); return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); if (isStaged) { let summaryContent = "## 🎭 Staged Mode: Create Pull Request Preview\n\n"; summaryContent += "The following pull request would be created if staged mode was disabled:\n\n"; @@ -4386,23 +4386,23 @@ jobs: const draftEnv = process.env.GITHUB_AW_PR_DRAFT; const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); if (!isEmpty) { @@ -4417,7 +4417,7 @@ jobs: remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { core.warning(`Remote branch ${branchName} already exists - appending random suffix`); diff --git a/pkg/workflow/js/add_labels.cjs b/pkg/workflow/js/add_labels.cjs index 9c8fc664c92..554432fd830 100644 --- a/pkg/workflow/js/add_labels.cjs +++ b/pkg/workflow/js/add_labels.cjs @@ -22,7 +22,7 @@ async function main() { core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -39,7 +39,7 @@ async function main() { core.warning("No add-labels item found in agent output"); return; } - core.debug(`Found add-labels item with ${labelsItem.labels.length} labels`); + core.info(`Found add-labels item with ${labelsItem.labels.length} labels`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Add Labels Preview\n\n"; summaryContent += "The following labels would be added if staged mode was disabled:\n\n"; @@ -63,9 +63,9 @@ async function main() { .filter(label => label) : undefined; if (allowedLabels) { - core.debug(`Allowed labels: ${JSON.stringify(allowedLabels)}`); + core.info(`Allowed labels: ${JSON.stringify(allowedLabels)}`); } else { - core.debug("No label restrictions - any labels are allowed"); + core.info("No label restrictions - any labels are allowed"); } const maxCountEnv = process.env.GITHUB_AW_LABELS_MAX_COUNT; const maxCount = maxCountEnv ? parseInt(maxCountEnv, 10) : 3; @@ -73,7 +73,7 @@ async function main() { core.setFailed(`Invalid max value: ${maxCountEnv}. Must be a positive integer`); return; } - core.debug(`Max count: ${maxCount}`); + core.info(`Max count: ${maxCount}`); const labelsTarget = process.env.GITHUB_AW_LABELS_TARGET || "triggering"; core.info(`Labels target configuration: ${labelsTarget}`); const isIssueContext = context.eventName === "issues" || context.eventName === "issue_comment"; @@ -130,7 +130,7 @@ async function main() { return; } const requestedLabels = labelsItem.labels || []; - core.debug(`Requested labels: ${JSON.stringify(requestedLabels)}`); + core.info(`Requested labels: ${JSON.stringify(requestedLabels)}`); for (const label of requestedLabels) { if (label && typeof label === "string" && label.startsWith("-")) { core.setFailed(`Label removal is not permitted. Found line starting with '-': ${label}`); @@ -152,7 +152,7 @@ async function main() { .map(label => (label.length > 64 ? label.substring(0, 64) : label)) .filter((label, index, arr) => arr.indexOf(label) === index); if (uniqueLabels.length > maxCount) { - core.debug(`too many labels, keep ${maxCount}`); + core.info(`too many labels, keep ${maxCount}`); uniqueLabels = uniqueLabels.slice(0, maxCount); } if (uniqueLabels.length === 0) { diff --git a/pkg/workflow/js/add_labels.test.cjs b/pkg/workflow/js/add_labels.test.cjs index d73f5f85870..fba9b4f284d 100644 --- a/pkg/workflow/js/add_labels.test.cjs +++ b/pkg/workflow/js/add_labels.test.cjs @@ -132,7 +132,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith("No label restrictions - any labels are allowed"); + expect(mockCore.info).toHaveBeenCalledWith("No label restrictions - any labels are allowed"); expect(mockGithub.rest.issues.addLabels).toHaveBeenCalledWith({ owner: "testowner", repo: "testrepo", @@ -157,7 +157,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith("No label restrictions - any labels are allowed"); + expect(mockCore.info).toHaveBeenCalledWith("No label restrictions - any labels are allowed"); expect(mockGithub.rest.issues.addLabels).toHaveBeenCalledWith({ owner: "testowner", repo: "testrepo", @@ -182,7 +182,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith(`Allowed labels: ${JSON.stringify(["bug", "enhancement"])}`); + expect(mockCore.info).toHaveBeenCalledWith(`Allowed labels: ${JSON.stringify(["bug", "enhancement"])}`); expect(mockGithub.rest.issues.addLabels).toHaveBeenCalledWith({ owner: "testowner", repo: "testrepo", @@ -244,7 +244,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith("Max count: 3"); + expect(mockCore.info).toHaveBeenCalledWith("Max count: 3"); expect(mockGithub.rest.issues.addLabels).toHaveBeenCalledWith({ owner: "testowner", repo: "testrepo", @@ -490,7 +490,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith("too many labels, keep 2"); + expect(mockCore.info).toHaveBeenCalledWith("too many labels, keep 2"); expect(mockGithub.rest.issues.addLabels).toHaveBeenCalledWith({ owner: "testowner", repo: "testrepo", @@ -642,7 +642,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith("Agent output content length: 64"); + expect(mockCore.info).toHaveBeenCalledWith("Agent output content length: 64"); }); it("should log allowed labels and max count", async () => { @@ -660,8 +660,8 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith(`Allowed labels: ${JSON.stringify(["bug", "enhancement", "feature"])}`); - expect(mockCore.debug).toHaveBeenCalledWith("Max count: 5"); + expect(mockCore.info).toHaveBeenCalledWith(`Allowed labels: ${JSON.stringify(["bug", "enhancement", "feature"])}`); + expect(mockCore.info).toHaveBeenCalledWith("Max count: 5"); }); it("should log requested labels", async () => { @@ -678,7 +678,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith(`Requested labels: ${JSON.stringify(["bug", "enhancement", "invalid"])}`); + expect(mockCore.info).toHaveBeenCalledWith(`Requested labels: ${JSON.stringify(["bug", "enhancement", "invalid"])}`); }); it("should log final labels being added", async () => { @@ -714,7 +714,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith(`Allowed labels: ${JSON.stringify(["bug", "enhancement", "feature"])}`); + expect(mockCore.info).toHaveBeenCalledWith(`Allowed labels: ${JSON.stringify(["bug", "enhancement", "feature"])}`); expect(mockGithub.rest.issues.addLabels).toHaveBeenCalledWith({ owner: "testowner", repo: "testrepo", @@ -737,7 +737,7 @@ describe("add_labels.cjs", () => { // Execute the script await eval(`(async () => { ${addLabelsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith(`Allowed labels: ${JSON.stringify(["bug", "enhancement"])}`); + expect(mockCore.info).toHaveBeenCalledWith(`Allowed labels: ${JSON.stringify(["bug", "enhancement"])}`); }); it("should handle single label output", async () => { diff --git a/pkg/workflow/js/check_membership.cjs b/pkg/workflow/js/check_membership.cjs index f73d6a47493..36a9563b69c 100644 --- a/pkg/workflow/js/check_membership.cjs +++ b/pkg/workflow/js/check_membership.cjs @@ -16,7 +16,7 @@ async function main() { return; } // If write is not allowed, continue with permission check - core.debug(`Event ${eventName} requires validation (write role not allowed)`); + core.info(`Event ${eventName} requires validation (write role not allowed)`); } // skip check for other safe events @@ -38,8 +38,8 @@ async function main() { // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, @@ -48,7 +48,7 @@ async function main() { }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { diff --git a/pkg/workflow/js/check_permissions.cjs b/pkg/workflow/js/check_permissions.cjs index 76ec53e0166..23e3137e659 100644 --- a/pkg/workflow/js/check_permissions.cjs +++ b/pkg/workflow/js/check_permissions.cjs @@ -21,8 +21,8 @@ async function main() { // Check if the actor has the required repository permissions try { - core.debug(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); - core.debug(`Required permissions: ${requiredPermissions.join(", ")}`); + core.info(`Checking if user '${actor}' has required permissions for ${owner}/${repo}`); + core.info(`Required permissions: ${requiredPermissions.join(", ")}`); const repoPermission = await github.rest.repos.getCollaboratorPermissionLevel({ owner: owner, @@ -31,7 +31,7 @@ async function main() { }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); // Check if user has one of the required permission levels for (const requiredPerm of requiredPermissions) { diff --git a/pkg/workflow/js/check_permissions.test.cjs b/pkg/workflow/js/check_permissions.test.cjs index eb7e3592080..213dba3d201 100644 --- a/pkg/workflow/js/check_permissions.test.cjs +++ b/pkg/workflow/js/check_permissions.test.cjs @@ -154,9 +154,9 @@ describe("check_permissions.cjs", () => { username: "testuser", }); - expect(mockCore.debug).toHaveBeenCalledWith("Checking if user 'testuser' has required permissions for testowner/testrepo"); - expect(mockCore.debug).toHaveBeenCalledWith("Required permissions: admin, maintainer, write"); - expect(mockCore.debug).toHaveBeenCalledWith("Repository permission level: admin"); + expect(mockCore.info).toHaveBeenCalledWith("Checking if user 'testuser' has required permissions for testowner/testrepo"); + expect(mockCore.info).toHaveBeenCalledWith("Required permissions: admin, maintainer, write"); + expect(mockCore.info).toHaveBeenCalledWith("Repository permission level: admin"); expect(mockCore.info).toHaveBeenCalledWith("✅ User has admin access to repository"); // Should not call any error or warning methods @@ -208,7 +208,7 @@ describe("check_permissions.cjs", () => { // Execute the script await eval(`(async () => { ${checkPermissionsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith("Repository permission level: write"); + expect(mockCore.info).toHaveBeenCalledWith("Repository permission level: write"); expect(mockCore.warning).toHaveBeenCalledWith("User permission 'write' does not meet requirements: admin, maintainer"); expect(mockCore.warning).toHaveBeenCalledWith( "Access denied: Only authorized users can trigger this workflow. User 'testuser' is not authorized. Required permissions: admin, maintainer" @@ -225,7 +225,7 @@ describe("check_permissions.cjs", () => { // Execute the script await eval(`(async () => { ${checkPermissionsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith("Repository permission level: read"); + expect(mockCore.info).toHaveBeenCalledWith("Repository permission level: read"); expect(mockCore.warning).toHaveBeenCalledWith("User permission 'read' does not meet requirements: admin, write"); expect(mockCore.warning).toHaveBeenCalledWith( "Access denied: Only authorized users can trigger this workflow. User 'testuser' is not authorized. Required permissions: admin, write" @@ -261,7 +261,7 @@ describe("check_permissions.cjs", () => { username: "different-user", }); - expect(mockCore.debug).toHaveBeenCalledWith("Checking if user 'different-user' has required permissions for testowner/testrepo"); + expect(mockCore.info).toHaveBeenCalledWith("Checking if user 'different-user' has required permissions for testowner/testrepo"); // Should not call any error or warning methods expect(mockCore.error).not.toHaveBeenCalled(); @@ -295,7 +295,7 @@ describe("check_permissions.cjs", () => { // Execute the script await eval(`(async () => { ${checkPermissionsScript} })()`); - expect(mockCore.debug).toHaveBeenCalledWith("Required permissions: write"); + expect(mockCore.info).toHaveBeenCalledWith("Required permissions: write"); expect(mockCore.info).toHaveBeenCalledWith("✅ User has write access to repository"); // Should not call any error or warning methods diff --git a/pkg/workflow/js/compute_text.cjs b/pkg/workflow/js/compute_text.cjs index 914c7d13e04..ca1755f7e38 100644 --- a/pkg/workflow/js/compute_text.cjs +++ b/pkg/workflow/js/compute_text.cjs @@ -176,7 +176,7 @@ async function main() { }); const permission = repoPermission.data.permission; - core.debug(`Repository permission level: ${permission}`); + core.info(`Repository permission level: ${permission}`); if (permission !== "admin" && permission !== "maintain") { core.setOutput("text", ""); @@ -259,7 +259,7 @@ async function main() { const sanitizedText = sanitizeContent(text); // Display sanitized text in logs - core.debug(`text: ${sanitizedText}`); + core.info(`text: ${sanitizedText}`); // Set the sanitized text as output core.setOutput("text", sanitizedText); diff --git a/pkg/workflow/js/create_discussion.cjs b/pkg/workflow/js/create_discussion.cjs index 44959b71aff..ff640a8d650 100644 --- a/pkg/workflow/js/create_discussion.cjs +++ b/pkg/workflow/js/create_discussion.cjs @@ -8,7 +8,7 @@ async function main() { core.info("Agent output content is empty"); return; } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); let validatedOutput; try { validatedOutput = JSON.parse(outputContent); @@ -25,7 +25,7 @@ async function main() { core.warning("No create-discussion items found in agent output"); return; } - core.debug(`Found ${createDiscussionItems.length} create-discussion item(s)`); + core.info(`Found ${createDiscussionItems.length} create-discussion item(s)`); if (process.env.GITHUB_AW_SAFE_OUTPUTS_STAGED === "true") { let summaryContent = "## 🎭 Staged Mode: Create Discussions Preview\n\n"; summaryContent += "The following discussions would be created if staged mode was disabled:\n\n"; diff --git a/pkg/workflow/js/create_discussion.test.cjs b/pkg/workflow/js/create_discussion.test.cjs index 2f3ffebf3f7..afd6cd78ffc 100644 --- a/pkg/workflow/js/create_discussion.test.cjs +++ b/pkg/workflow/js/create_discussion.test.cjs @@ -113,7 +113,7 @@ describe("create_discussion.cjs", () => { await eval(`(async () => { ${createDiscussionScript} })()`); // Check that it logs the content length first, then the error - expect(mockCore.debug).toHaveBeenCalledWith("Agent output content length: 12"); + expect(mockCore.info).toHaveBeenCalledWith("Agent output content length: 12"); expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringMatching(/Error parsing agent output JSON:.*Unexpected token/)); }); diff --git a/pkg/workflow/js/create_pull_request.cjs b/pkg/workflow/js/create_pull_request.cjs index 24bd2caff6b..52199deb89c 100644 --- a/pkg/workflow/js/create_pull_request.cjs +++ b/pkg/workflow/js/create_pull_request.cjs @@ -166,7 +166,7 @@ async function main() { } } - core.debug(`Agent output content length: ${outputContent.length}`); + core.info(`Agent output content length: ${outputContent.length}`); if (!isEmpty) { core.info("Patch content validation passed"); } else { @@ -194,7 +194,7 @@ async function main() { return; } - core.debug(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); + core.info(`Found create-pull-request item: title="${pullRequestItem.title}", bodyLength=${pullRequestItem.body.length}`); // If in staged mode, emit step summary instead of creating PR if (isStaged) { @@ -267,33 +267,33 @@ async function main() { const draft = draftEnv ? draftEnv.toLowerCase() === "true" : true; core.info(`Creating pull request with title: ${title}`); - core.debug(`Labels: ${JSON.stringify(labels)}`); - core.debug(`Draft: ${draft}`); - core.debug(`Body length: ${body.length}`); + core.info(`Labels: ${JSON.stringify(labels)}`); + core.info(`Draft: ${draft}`); + core.info(`Body length: ${body.length}`); const randomHex = crypto.randomBytes(8).toString("hex"); // Use branch name from JSONL if provided, otherwise generate unique branch name if (!branchName) { - core.debug("No branch name provided in JSONL, generating unique branch name"); + core.info("No branch name provided in JSONL, generating unique branch name"); // Generate unique branch name using cryptographic random hex branchName = `${workflowId}-${randomHex}`; } else { branchName = `${branchName}-${randomHex}`; - core.debug(`Using branch name from JSONL with added salt: ${branchName}`); + core.info(`Using branch name from JSONL with added salt: ${branchName}`); } core.info(`Generated branch name: ${branchName}`); - core.debug(`Base branch: ${baseBranch}`); + core.info(`Base branch: ${baseBranch}`); // Create a new branch using git CLI, ensuring it's based on the correct base branch // First, fetch latest changes and checkout the base branch - core.debug(`Fetching latest changes and checking out base branch: ${baseBranch}`); + core.info(`Fetching latest changes and checking out base branch: ${baseBranch}`); await exec.exec("git fetch origin"); await exec.exec(`git checkout ${baseBranch}`); // Handle branch creation/checkout - core.debug(`Branch should not exist locally, creating new branch from base: ${branchName}`); + core.info(`Branch should not exist locally, creating new branch from base: ${branchName}`); await exec.exec(`git checkout -b ${branchName}`); core.info(`Created new branch from base: ${branchName}`); @@ -314,7 +314,7 @@ async function main() { remoteBranchExists = true; } } catch (checkError) { - core.debug(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); + core.info(`Remote branch check failed (non-fatal): ${checkError instanceof Error ? checkError.message : String(checkError)}`); } if (remoteBranchExists) { diff --git a/pkg/workflow/js/redact_secrets.cjs b/pkg/workflow/js/redact_secrets.cjs index 6a4dd0c31cd..3a543431877 100644 --- a/pkg/workflow/js/redact_secrets.cjs +++ b/pkg/workflow/js/redact_secrets.cjs @@ -65,7 +65,7 @@ function redactSecrets(content, secretValues) { if (occurrences > 0) { redacted = parts.join(replacement); redactionCount += occurrences; - core.debug(`Redacted ${occurrences} occurrence(s) of a secret`); + core.info(`Redacted ${occurrences} occurrence(s) of a secret`); } } return { content: redacted, redactionCount }; @@ -83,7 +83,7 @@ function processFile(filePath, secretValues) { const { content: redactedContent, redactionCount } = redactSecrets(content, secretValues); if (redactionCount > 0) { fs.writeFileSync(filePath, redactedContent, "utf8"); - core.debug(`Processed ${filePath}: ${redactionCount} redaction(s)`); + core.info(`Processed ${filePath}: ${redactionCount} redaction(s)`); } return redactionCount; } catch (error) { diff --git a/pkg/workflow/js/redact_secrets.test.cjs b/pkg/workflow/js/redact_secrets.test.cjs index daa46246492..26cc2c42dd3 100644 --- a/pkg/workflow/js/redact_secrets.test.cjs +++ b/pkg/workflow/js/redact_secrets.test.cjs @@ -133,7 +133,7 @@ describe("redact_secrets.cjs", () => { expect(fs.readFileSync(path.join(tempDir, "test3.log"), "utf8")).toBe("Log: api********"); }); - it("should use core.debug for logging hits", async () => { + it("should use core.info for logging hits", async () => { const testFile = path.join(tempDir, "test.txt"); const secretValue = "sk-1234567890"; fs.writeFileSync(testFile, `Secret: ${secretValue} and ${secretValue}`); @@ -148,9 +148,9 @@ describe("redact_secrets.cjs", () => { await eval(`(async () => { ${modifiedScript} })()`); - // Verify core.debug was called for redaction - expect(mockCore.debug).toHaveBeenCalledWith(expect.stringContaining("occurrence(s) of a secret")); - expect(mockCore.debug).toHaveBeenCalledWith(expect.stringContaining("Processed")); + // Verify core.info was called for redaction + expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("occurrence(s) of a secret")); + expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("Processed")); }); it("should not log actual secret values", async () => { diff --git a/pkg/workflow/js/validate_errors.cjs b/pkg/workflow/js/validate_errors.cjs index 94a0422082d..7b8c5251f93 100644 --- a/pkg/workflow/js/validate_errors.cjs +++ b/pkg/workflow/js/validate_errors.cjs @@ -2,7 +2,7 @@ function main() { const fs = require("fs"); const path = require("path"); - core.debug("Starting validate_errors.cjs script"); + core.info("Starting validate_errors.cjs script"); const startTime = Date.now(); try { @@ -11,7 +11,7 @@ function main() { throw new Error("GITHUB_AW_AGENT_OUTPUT environment variable is required"); } - core.debug(`Log path: ${logPath}`); + core.info(`Log path: ${logPath}`); if (!fs.existsSync(logPath)) { core.info(`Log path not found: ${logPath}`); @@ -26,7 +26,7 @@ function main() { } core.info(`Loaded ${patterns.length} error patterns`); - core.debug(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); + core.info(`Patterns: ${JSON.stringify(patterns.map(p => ({ description: p.description, pattern: p.pattern })))}`); let content = ""; @@ -51,7 +51,7 @@ function main() { for (const file of logFiles) { const filePath = path.join(logPath, file); const fileContent = fs.readFileSync(filePath, "utf8"); - core.debug(`Reading log file: ${file} (${fileContent.length} bytes)`); + core.info(`Reading log file: ${file} (${fileContent.length} bytes)`); content += fileContent; // Add a newline between files if the previous file doesn't end with one if (content.length > 0 && !content.endsWith("\n")) { @@ -144,14 +144,14 @@ function validateErrors(logContent, patterns) { const MAX_ITERATIONS_PER_LINE = 10000; // Maximum regex matches per line const ITERATION_WARNING_THRESHOLD = 1000; // Warn if iterations exceed this - core.debug(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); + core.info(`Starting error validation with ${patterns.length} patterns and ${lines.length} lines`); for (let patternIndex = 0; patternIndex < patterns.length; patternIndex++) { const pattern = patterns[patternIndex]; let regex; try { regex = new RegExp(pattern.pattern, "g"); - core.debug(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); + core.info(`Pattern ${patternIndex + 1}/${patterns.length}: ${pattern.description || "Unknown"} - regex: ${pattern.pattern}`); } catch (e) { core.error(`invalid error regex pattern: ${pattern.pattern}`); continue; @@ -212,12 +212,12 @@ function validateErrors(logContent, patterns) { // Log if we had a significant number of matches on a line if (iterationCount > 100) { - core.debug(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); + core.info(`Line ${lineIndex + 1} had ${iterationCount} matches for pattern: ${pattern.description || pattern.pattern}`); } } } - core.debug(`Error validation completed. Errors found: ${hasErrors}`); + core.info(`Error validation completed. Errors found: ${hasErrors}`); return hasErrors; } diff --git a/pkg/workflow/js/validate_errors.test.cjs b/pkg/workflow/js/validate_errors.test.cjs index 0cf69a020a7..6c416b4b564 100644 --- a/pkg/workflow/js/validate_errors.test.cjs +++ b/pkg/workflow/js/validate_errors.test.cjs @@ -539,11 +539,11 @@ describe("infinite loop detection", () => { validateErrors(logContent, patterns); - // Should have logged debug information - const debugCalls = global.core.debug.mock.calls.map(call => call[0]); + // Should have logged info information + const infoCalls = global.core.info.mock.calls.map(call => call[0]); // Should log pattern count and line count - const hasPatternInfo = debugCalls.some(msg => msg.includes("patterns") && msg.includes("lines")); + const hasPatternInfo = infoCalls.some(msg => msg.includes("patterns") && msg.includes("lines")); expect(hasPatternInfo).toBe(true); }); });