From 548fd70aabfa16926d03221fbb109ea21f04db56 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:13:59 +0000 Subject: [PATCH 1/4] Initial plan From 0c041ca32677c962a70189d12ea39a7f60d81110 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:22:14 +0000 Subject: [PATCH 2/4] Initial investigation of GH_AW_ACTION_OUTPUT empty issue Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/mcp-inspector.lock.yml | 222 +++++++++++------------ 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 9451b1eb7fa..8fe648cd605 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -31,8 +31,8 @@ # detection["detection"] # create_discussion["create_discussion"] # missing_tool["missing_tool"] -# post_to_slack_channel["post_to_slack_channel"] # notion_add_comment["notion_add_comment"] +# post_to_slack_channel["post_to_slack_channel"] # pre_activation --> activation # activation --> agent # agent --> detection @@ -40,10 +40,10 @@ # detection --> create_discussion # agent --> missing_tool # detection --> missing_tool -# agent --> post_to_slack_channel -# detection --> post_to_slack_channel # agent --> notion_add_comment # detection --> notion_add_comment +# agent --> post_to_slack_channel +# detection --> post_to_slack_channel # ``` name: "MCP Inspector Agent" @@ -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; } } From 6bfaa941cb307cd0bfcf480097e91292bf1cba14 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:29:36 +0000 Subject: [PATCH 3/4] Fix GH_AW_ACTION_OUTPUT empty issue in safe output jobs - Add artifact download steps to buildGitHubScriptStep - Change from using job outputs to artifact-based approach - Update GITHUB_AW_AGENT_OUTPUT to read from env instead of job outputs - Update tests to reflect new artifact download behavior - Recompile all workflows with new artifact download steps Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/artifacts-summary.lock.yml | 24 ++++- .github/workflows/audit-workflows.lock.yml | 24 ++++- .github/workflows/brave.lock.yml | 36 ++++++- .../workflows/changeset-generator.lock.yml | 12 ++- .github/workflows/ci-doctor.lock.yml | 48 +++++++++- .../workflows/cli-version-checker.lock.yml | 24 ++++- .github/workflows/daily-doc-updater.lock.yml | 24 ++++- .github/workflows/daily-news.lock.yml | 24 ++++- .github/workflows/dev.lock.yml | 24 ++++- .../duplicate-code-detector.lock.yml | 24 ++++- .../example-workflow-analyzer.lock.yml | 24 ++++- .../github-mcp-tools-report.lock.yml | 36 ++++++- .../workflows/go-pattern-detector.lock.yml | 24 ++++- .github/workflows/issue-classifier.lock.yml | 24 ++++- .github/workflows/lockfile-stats.lock.yml | 24 ++++- .github/workflows/mcp-inspector.lock.yml | 24 ++++- .github/workflows/pdf-summary.lock.yml | 36 ++++++- .github/workflows/plan.lock.yml | 24 ++++- .github/workflows/poem-bot.lock.yml | 96 +++++++++++++++++-- .github/workflows/q.lock.yml | 48 +++++++++- .github/workflows/repo-tree-map.lock.yml | 24 ++++- .github/workflows/research.lock.yml | 24 ++++- .github/workflows/scout.lock.yml | 36 ++++++- .github/workflows/security-fix-pr.lock.yml | 24 ++++- .github/workflows/smoke-claude.lock.yml | 24 ++++- .github/workflows/smoke-codex.lock.yml | 24 ++++- .github/workflows/smoke-copilot.lock.yml | 24 ++++- .github/workflows/smoke-genaiscript.lock.yml | 24 ++++- .github/workflows/smoke-opencode.lock.yml | 24 ++++- .../workflows/technical-doc-writer.lock.yml | 48 +++++++++- .github/workflows/tidy.lock.yml | 24 ++++- .github/workflows/unbloat-docs.lock.yml | 48 +++++++++- pkg/workflow/safe_output_helpers.go | 31 +++++- pkg/workflow/safe_output_helpers_test.go | 12 ++- 34 files changed, 929 insertions(+), 86 deletions(-) diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index a70fd44f2ea..f7e1a9cd764 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -3434,11 +3434,21 @@ jobs: discussion_number: ${{ steps.create_discussion.outputs.discussion_number }} discussion_url: ${{ steps.create_discussion.outputs.discussion_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Discussion id: create_discussion uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Artifacts Summary" GITHUB_AW_DISCUSSION_CATEGORY: "artifacts" with: @@ -3660,11 +3670,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index 98f4aedc185..8c7c1dc7ea0 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -3308,11 +3308,21 @@ jobs: discussion_number: ${{ steps.create_discussion.outputs.discussion_number }} discussion_url: ${{ steps.create_discussion.outputs.discussion_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Discussion id: create_discussion uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Agentic Workflow Audit Agent" GITHUB_AW_DISCUSSION_CATEGORY: "audits" with: @@ -3534,11 +3544,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index 40569cc205a..3a0b4314a3d 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -4204,11 +4204,21 @@ jobs: run: | echo "Output: $AGENT_OUTPUT" echo "Output types: $AGENT_OUTPUT_TYPES" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Issue Comment id: add_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Brave Web Search Agent" with: script: | @@ -4497,11 +4507,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { @@ -4618,11 +4638,21 @@ jobs: echo "Comment Repo: $COMMENT_REPO" echo "Agent Output Types: $AGENT_OUTPUT_TYPES" echo "Agent Conclusion: $AGENT_CONCLUSION" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update reaction comment with error notification id: update_reaction uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GITHUB_AW_COMMENT_REPO: ${{ needs.activation.outputs.comment_repo }} GITHUB_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/changeset-generator.lock.yml b/.github/workflows/changeset-generator.lock.yml index 6dc2e5497c0..23a06189be3 100644 --- a/.github/workflows/changeset-generator.lock.yml +++ b/.github/workflows/changeset-generator.lock.yml @@ -3999,11 +3999,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml index 019be52cb49..2bf37858648 100644 --- a/.github/workflows/ci-doctor.lock.yml +++ b/.github/workflows/ci-doctor.lock.yml @@ -3519,11 +3519,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "CI Failure Doctor" GITHUB_AW_WORKFLOW_SOURCE: "githubnext/agentics/workflows/ci-doctor.md" GITHUB_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/githubnext/agentics/tree/main/workflows/ci-doctor.md" @@ -3810,11 +3820,21 @@ jobs: run: | echo "Output: $AGENT_OUTPUT" echo "Output types: $AGENT_OUTPUT_TYPES" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Issue Comment id: add_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "CI Failure Doctor" GITHUB_AW_WORKFLOW_SOURCE: "githubnext/agentics/workflows/ci-doctor.md" GITHUB_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/githubnext/agentics/tree/main/workflows/ci-doctor.md" @@ -4105,11 +4125,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { @@ -4227,11 +4257,21 @@ jobs: echo "Comment Repo: $COMMENT_REPO" echo "Agent Output Types: $AGENT_OUTPUT_TYPES" echo "Agent Conclusion: $AGENT_CONCLUSION" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update reaction comment with error notification id: update_reaction uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GITHUB_AW_COMMENT_REPO: ${{ needs.activation.outputs.comment_repo }} GITHUB_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/cli-version-checker.lock.yml b/.github/workflows/cli-version-checker.lock.yml index b92a947836f..9978198f79b 100644 --- a/.github/workflows/cli-version-checker.lock.yml +++ b/.github/workflows/cli-version-checker.lock.yml @@ -3211,11 +3211,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "CLI Version Checker" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -3631,11 +3641,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index 50ec1e8c739..90e48418000 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -3353,11 +3353,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "Daily Documentation Updater" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -3773,11 +3783,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index 8d727e74bbe..c8f018469d6 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -3449,11 +3449,21 @@ jobs: discussion_number: ${{ steps.create_discussion.outputs.discussion_number }} discussion_url: ${{ steps.create_discussion.outputs.discussion_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Discussion id: create_discussion uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Daily News" GITHUB_AW_DISCUSSION_CATEGORY: "daily-news" with: @@ -3675,11 +3685,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index f47a97e37d7..37203b7a498 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -3834,11 +3834,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Dev" GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" with: @@ -4111,11 +4121,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/duplicate-code-detector.lock.yml b/.github/workflows/duplicate-code-detector.lock.yml index 0274e8e4934..e9abf4143be 100644 --- a/.github/workflows/duplicate-code-detector.lock.yml +++ b/.github/workflows/duplicate-code-detector.lock.yml @@ -3043,11 +3043,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Duplicate Code Detector" GITHUB_AW_ISSUE_TITLE_PREFIX: "[duplicate-code] " GITHUB_AW_ISSUE_LABELS: "code-quality,automated-analysis" @@ -3321,11 +3331,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/example-workflow-analyzer.lock.yml b/.github/workflows/example-workflow-analyzer.lock.yml index 35f5e68f98c..11ea60628a8 100644 --- a/.github/workflows/example-workflow-analyzer.lock.yml +++ b/.github/workflows/example-workflow-analyzer.lock.yml @@ -3019,11 +3019,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Weekly Workflow Analysis" GITHUB_AW_ISSUE_TITLE_PREFIX: "[workflow-analysis] " GITHUB_AW_ISSUE_LABELS: "automation,ci-improvement" @@ -3297,11 +3307,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/github-mcp-tools-report.lock.yml b/.github/workflows/github-mcp-tools-report.lock.yml index 76da1a7035c..4dfa7481d41 100644 --- a/.github/workflows/github-mcp-tools-report.lock.yml +++ b/.github/workflows/github-mcp-tools-report.lock.yml @@ -3526,11 +3526,21 @@ jobs: discussion_number: ${{ steps.create_discussion.outputs.discussion_number }} discussion_url: ${{ steps.create_discussion.outputs.discussion_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Discussion id: create_discussion uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "GitHub MCP Remote Server Tools Report Generator" GITHUB_AW_DISCUSSION_CATEGORY: "audits" with: @@ -3773,11 +3783,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "GitHub MCP Remote Server Tools Report Generator" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -4193,11 +4213,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/go-pattern-detector.lock.yml b/.github/workflows/go-pattern-detector.lock.yml index a3d1fc0c259..82ab6a7d8ee 100644 --- a/.github/workflows/go-pattern-detector.lock.yml +++ b/.github/workflows/go-pattern-detector.lock.yml @@ -3136,11 +3136,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Go Pattern Detector" GITHUB_AW_ISSUE_TITLE_PREFIX: "[ast-grep] " GITHUB_AW_ISSUE_LABELS: "code-quality,ast-grep" @@ -3414,11 +3424,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/issue-classifier.lock.yml b/.github/workflows/issue-classifier.lock.yml index eaabc0cf687..a845dea3766 100644 --- a/.github/workflows/issue-classifier.lock.yml +++ b/.github/workflows/issue-classifier.lock.yml @@ -2660,11 +2660,21 @@ jobs: outputs: labels_added: ${{ steps.add_labels.outputs.labels_added }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Labels id: add_labels uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_LABELS_ALLOWED: "bug,feature,enhancement,documentation" GITHUB_AW_LABELS_MAX_COUNT: 1 with: @@ -2880,11 +2890,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/lockfile-stats.lock.yml b/.github/workflows/lockfile-stats.lock.yml index f8e868f8679..ec2f088e71f 100644 --- a/.github/workflows/lockfile-stats.lock.yml +++ b/.github/workflows/lockfile-stats.lock.yml @@ -3371,11 +3371,21 @@ jobs: discussion_number: ${{ steps.create_discussion.outputs.discussion_number }} discussion_url: ${{ steps.create_discussion.outputs.discussion_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Discussion id: create_discussion uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Lockfile Statistics Analysis Agent" GITHUB_AW_DISCUSSION_CATEGORY: "audits" with: @@ -3597,11 +3607,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 8fe648cd605..143df4346fa 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -4396,11 +4396,21 @@ jobs: discussion_number: ${{ steps.create_discussion.outputs.discussion_number }} discussion_url: ${{ steps.create_discussion.outputs.discussion_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Discussion id: create_discussion uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "MCP Inspector Agent" GITHUB_AW_DISCUSSION_CATEGORY: "audits" with: @@ -4622,11 +4632,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index e3aae89b387..a0f0fb3224a 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -4157,11 +4157,21 @@ jobs: run: | echo "Output: $AGENT_OUTPUT" echo "Output types: $AGENT_OUTPUT_TYPES" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Issue Comment id: add_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Resource Summarizer Agent" with: script: | @@ -4450,11 +4460,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { @@ -4571,11 +4591,21 @@ jobs: echo "Comment Repo: $COMMENT_REPO" echo "Agent Output Types: $AGENT_OUTPUT_TYPES" echo "Agent Conclusion: $AGENT_CONCLUSION" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update reaction comment with error notification id: update_reaction uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GITHUB_AW_COMMENT_REPO: ${{ needs.activation.outputs.comment_repo }} GITHUB_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index b80b74cf831..0f8a6a85534 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -4023,11 +4023,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Plan Command" GITHUB_AW_ISSUE_TITLE_PREFIX: "[task] " GITHUB_AW_ISSUE_LABELS: "task,ai-generated" @@ -4301,11 +4311,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 90a0673ef7d..55b2e5e3908 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -4230,11 +4230,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Poem Bot - A Creative Agentic Workflow" GITHUB_AW_ISSUE_TITLE_PREFIX: "[🎭 POEM-BOT] " GITHUB_AW_ISSUE_LABELS: "poetry,automation,ai-generated" @@ -4519,11 +4529,21 @@ jobs: run: | echo "Output: $AGENT_OUTPUT" echo "Output types: $AGENT_OUTPUT_TYPES" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Issue Comment id: add_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Poem Bot - A Creative Agentic Workflow" GITHUB_AW_COMMENT_TARGET: "*" GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" @@ -4817,11 +4837,21 @@ jobs: review_comment_id: ${{ steps.create_pr_review_comment.outputs.review_comment_id }} review_comment_url: ${{ steps.create_pr_review_comment.outputs.review_comment_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create PR Review Comment id: create_pr_review_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Poem Bot - A Creative Agentic Workflow" GITHUB_AW_PR_REVIEW_COMMENT_SIDE: "RIGHT" GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" @@ -5123,11 +5153,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "Poem Bot - A Creative Agentic Workflow" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -5547,11 +5587,21 @@ jobs: outputs: labels_added: ${{ steps.add_labels.outputs.labels_added }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Labels id: add_labels uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_LABELS_ALLOWED: "poetry,creative,automation,ai-generated,epic,haiku,sonnet,limerick" GITHUB_AW_LABELS_MAX_COUNT: 5 GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" @@ -5769,11 +5819,21 @@ jobs: issue_number: ${{ steps.update_issue.outputs.issue_number }} issue_url: ${{ steps.update_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update Issue id: update_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_UPDATE_STATUS: true GITHUB_AW_UPDATE_TITLE: true GITHUB_AW_UPDATE_BODY: true @@ -6258,11 +6318,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { @@ -6566,11 +6636,21 @@ jobs: echo "Comment Repo: $COMMENT_REPO" echo "Agent Output Types: $AGENT_OUTPUT_TYPES" echo "Agent Conclusion: $AGENT_CONCLUSION" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update reaction comment with error notification id: update_reaction uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GITHUB_AW_COMMENT_REPO: ${{ needs.activation.outputs.comment_repo }} GITHUB_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index e496cb262e8..880e36356b5 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -4552,11 +4552,21 @@ jobs: run: | echo "Output: $AGENT_OUTPUT" echo "Output types: $AGENT_OUTPUT_TYPES" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Issue Comment id: add_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Q" with: script: | @@ -4866,11 +4876,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "Q" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -5286,11 +5306,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { @@ -5408,11 +5438,21 @@ jobs: echo "Comment Repo: $COMMENT_REPO" echo "Agent Output Types: $AGENT_OUTPUT_TYPES" echo "Agent Conclusion: $AGENT_CONCLUSION" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update reaction comment with error notification id: update_reaction uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GITHUB_AW_COMMENT_REPO: ${{ needs.activation.outputs.comment_repo }} GITHUB_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index 8b99245ee58..c8efd38ebec 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -3454,11 +3454,21 @@ jobs: discussion_number: ${{ steps.create_discussion.outputs.discussion_number }} discussion_url: ${{ steps.create_discussion.outputs.discussion_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Discussion id: create_discussion uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Repository Tree Map Generator" GITHUB_AW_DISCUSSION_CATEGORY: "dev" with: @@ -3680,11 +3690,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index ed6dcd9024c..83462650d8a 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -3430,11 +3430,21 @@ jobs: discussion_number: ${{ steps.create_discussion.outputs.discussion_number }} discussion_url: ${{ steps.create_discussion.outputs.discussion_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Discussion id: create_discussion uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Basic Research Agent" GITHUB_AW_DISCUSSION_CATEGORY: "research" with: @@ -3656,11 +3666,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/scout.lock.yml b/.github/workflows/scout.lock.yml index 665a5ee6ecd..22e632bc4be 100644 --- a/.github/workflows/scout.lock.yml +++ b/.github/workflows/scout.lock.yml @@ -4580,11 +4580,21 @@ jobs: run: | echo "Output: $AGENT_OUTPUT" echo "Output types: $AGENT_OUTPUT_TYPES" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Issue Comment id: add_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Scout" with: script: | @@ -4873,11 +4883,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { @@ -4994,11 +5014,21 @@ jobs: echo "Comment Repo: $COMMENT_REPO" echo "Agent Output Types: $AGENT_OUTPUT_TYPES" echo "Agent Conclusion: $AGENT_CONCLUSION" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update reaction comment with error notification id: update_reaction uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GITHUB_AW_COMMENT_REPO: ${{ needs.activation.outputs.comment_repo }} GITHUB_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/security-fix-pr.lock.yml b/.github/workflows/security-fix-pr.lock.yml index 1604a4d1dee..cf068e01407 100644 --- a/.github/workflows/security-fix-pr.lock.yml +++ b/.github/workflows/security-fix-pr.lock.yml @@ -3298,11 +3298,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "Security Fix PR" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -3718,11 +3728,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index d42a328650b..76a3f3d9bba 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -2978,11 +2978,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Smoke Claude" GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" with: @@ -3255,11 +3265,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index ae9b5376df5..fa9c46e03ac 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -2790,11 +2790,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Smoke Codex" GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" with: @@ -3067,11 +3077,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index d93ddacb49e..6eec1db5c22 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -3380,11 +3380,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Smoke Copilot" GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" with: @@ -3657,11 +3667,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/smoke-genaiscript.lock.yml b/.github/workflows/smoke-genaiscript.lock.yml index 279dd30dac6..d4d0d173815 100644 --- a/.github/workflows/smoke-genaiscript.lock.yml +++ b/.github/workflows/smoke-genaiscript.lock.yml @@ -2149,11 +2149,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Smoke GenAIScript" GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" with: @@ -2426,11 +2436,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/smoke-opencode.lock.yml b/.github/workflows/smoke-opencode.lock.yml index 3167dc7caf8..82b74584939 100644 --- a/.github/workflows/smoke-opencode.lock.yml +++ b/.github/workflows/smoke-opencode.lock.yml @@ -2117,11 +2117,21 @@ jobs: issue_number: ${{ steps.create_issue.outputs.issue_number }} issue_url: ${{ steps.create_issue.outputs.issue_url }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Output Issue id: create_issue uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Smoke OpenCode" GITHUB_AW_SAFE_OUTPUTS_STAGED: "true" with: @@ -2394,11 +2404,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 058f4616382..dd1b92e42b7 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -3393,11 +3393,21 @@ jobs: run: | echo "Output: $AGENT_OUTPUT" echo "Output types: $AGENT_OUTPUT_TYPES" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Issue Comment id: add_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Technical Documentation Writer for GitHub Actions" with: script: | @@ -3707,11 +3717,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "Technical Documentation Writer for GitHub Actions" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -4127,11 +4147,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { @@ -4429,11 +4459,21 @@ jobs: echo "Comment Repo: $COMMENT_REPO" echo "Agent Output Types: $AGENT_OUTPUT_TYPES" echo "Agent Conclusion: $AGENT_CONCLUSION" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update reaction comment with error notification id: update_reaction uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GITHUB_AW_COMMENT_REPO: ${{ needs.activation.outputs.comment_repo }} GITHUB_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index 629bc3ac64f..28e3980ab9c 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -4007,11 +4007,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "Tidy" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -4722,11 +4732,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index b3cafe24410..eecdbe1ece6 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -3869,11 +3869,21 @@ jobs: run: | echo "Output: $AGENT_OUTPUT" echo "Output types: $AGENT_OUTPUT_TYPES" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Add Issue Comment id: add_comment uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_NAME: "Documentation Unbloat" with: script: | @@ -4183,11 +4193,21 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "${{ github.workflow }}" echo "Git configured with standard GitHub Actions identity" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Create Pull Request id: create_pull_request uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_WORKFLOW_ID: "agent" GITHUB_AW_WORKFLOW_NAME: "Documentation Unbloat" GITHUB_AW_BASE_BRANCH: ${{ github.ref_name }} @@ -4603,11 +4623,21 @@ jobs: tools_reported: ${{ steps.missing_tool.outputs.tools_reported }} total_count: ${{ steps.missing_tool.outputs.total_count }} steps: + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Record Missing Tool id: missing_tool uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} with: script: | async function main() { @@ -4905,11 +4935,21 @@ jobs: echo "Comment Repo: $COMMENT_REPO" echo "Agent Output Types: $AGENT_OUTPUT_TYPES" echo "Agent Conclusion: $AGENT_CONCLUSION" + - name: Download agent output artifact + continue-on-error: true + uses: actions/download-artifact@v5 + with: + name: agent_output.json + path: /tmp/gh-aw/safe-outputs/ + - name: Setup agent output environment variable + run: | + find /tmp/gh-aw/safe-outputs/ -type f -print + echo "GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/agent_output.json" >> $GITHUB_ENV - name: Update reaction comment with error notification id: update_reaction uses: actions/github-script@v8 env: - GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }} + GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }} GITHUB_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GITHUB_AW_COMMENT_REPO: ${{ needs.activation.outputs.comment_repo }} GITHUB_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/pkg/workflow/safe_output_helpers.go b/pkg/workflow/safe_output_helpers.go index e4e69dcf6c5..33c4c43c68b 100644 --- a/pkg/workflow/safe_output_helpers.go +++ b/pkg/workflow/safe_output_helpers.go @@ -37,6 +37,9 @@ type GitHubScriptStepConfig struct { func (c *Compiler) buildGitHubScriptStep(data *WorkflowData, config GitHubScriptStepConfig) []string { var steps []string + // Add artifact download steps before the GitHub Script step + steps = append(steps, buildAgentOutputDownloadSteps()...) + // Step name and metadata steps = append(steps, fmt.Sprintf(" - name: %s\n", config.StepName)) steps = append(steps, fmt.Sprintf(" id: %s\n", config.StepID)) @@ -45,8 +48,9 @@ func (c *Compiler) buildGitHubScriptStep(data *WorkflowData, config GitHubScript // Environment variables section steps = append(steps, " env:\n") - // Always add the agent output from the main job - steps = append(steps, fmt.Sprintf(" GITHUB_AW_AGENT_OUTPUT: ${{ needs.%s.outputs.output }}\n", config.MainJobName)) + // Read GITHUB_AW_AGENT_OUTPUT from environment (set by artifact download step) + // instead of directly from job outputs which may be masked by GitHub Actions + steps = append(steps, " GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }}\n") // Add custom environment variables specific to this safe output type steps = append(steps, config.CustomEnvVars...) @@ -66,6 +70,29 @@ func (c *Compiler) buildGitHubScriptStep(data *WorkflowData, config GitHubScript return steps } +// buildAgentOutputDownloadSteps creates steps to download the agent output artifact +// and set the GITHUB_AW_AGENT_OUTPUT environment variable +func buildAgentOutputDownloadSteps() []string { + var steps []string + + // Add step to download agent output artifact + steps = append(steps, " - name: Download agent output artifact\n") + steps = append(steps, " continue-on-error: true\n") + steps = append(steps, " uses: actions/download-artifact@v5\n") + steps = append(steps, " with:\n") + steps = append(steps, fmt.Sprintf(" name: %s\n", "agent_output.json")) // Use constant value directly to avoid import cycle + steps = append(steps, " path: /tmp/gh-aw/safe-outputs/\n") + + // Add environment variables step to set GITHUB_AW_AGENT_OUTPUT + steps = append(steps, " - name: Setup agent output environment variable\n") + steps = append(steps, " run: |\n") + steps = append(steps, " find /tmp/gh-aw/safe-outputs/ -type f -print\n") + // Configure GITHUB_AW_AGENT_OUTPUT to point to downloaded artifact file + steps = append(steps, fmt.Sprintf(" echo \"GITHUB_AW_AGENT_OUTPUT=/tmp/gh-aw/safe-outputs/%s\" >> $GITHUB_ENV\n", "agent_output.json")) + + return steps +} + func generateSafeOutputsConfig(data *WorkflowData) string { // Pass the safe-outputs configuration for validation if data.SafeOutputs == nil { diff --git a/pkg/workflow/safe_output_helpers_test.go b/pkg/workflow/safe_output_helpers_test.go index 8d7cc89b5ab..1a8651b6632 100644 --- a/pkg/workflow/safe_output_helpers_test.go +++ b/pkg/workflow/safe_output_helpers_test.go @@ -28,11 +28,13 @@ func TestBuildGitHubScriptStep(t *testing.T) { Token: "", }, expectedInSteps: []string{ + "- name: Download agent output artifact", + "- name: Setup agent output environment variable", "- name: Test Step", "id: test_step", "uses: actions/github-script@v8", "env:", - "GITHUB_AW_AGENT_OUTPUT: ${{ needs.main_job.outputs.output }}", + "GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }}", "with:", "script: |", "console.log('test');", @@ -55,10 +57,12 @@ func TestBuildGitHubScriptStep(t *testing.T) { Token: "", }, expectedInSteps: []string{ + "- name: Download agent output artifact", + "- name: Setup agent output environment variable", "- name: Create Issue", "id: create_issue", "uses: actions/github-script@v8", - "GITHUB_AW_AGENT_OUTPUT: ${{ needs.agent.outputs.output }}", + "GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }}", "GITHUB_AW_ISSUE_TITLE_PREFIX: \"[bot] \"", "GITHUB_AW_ISSUE_LABELS: \"automation,ai\"", "const issue = true;", @@ -83,9 +87,11 @@ func TestBuildGitHubScriptStep(t *testing.T) { Token: "", }, expectedInSteps: []string{ + "- name: Download agent output artifact", + "- name: Setup agent output environment variable", "- name: Process Output", "id: process", - "GITHUB_AW_AGENT_OUTPUT: ${{ needs.main.outputs.output }}", + "GITHUB_AW_AGENT_OUTPUT: ${{ env.GITHUB_AW_AGENT_OUTPUT }}", "CUSTOM_VAR_1: value1", "CUSTOM_VAR_2: value2", }, From bde5a1bd8f50818b161a2028d4675ee81354755f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 Oct 2025 16:28:39 +0000 Subject: [PATCH 4/4] Add changeset for safe output agent output fix --- .changeset/patch-fix-safe-output-agent-output.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/patch-fix-safe-output-agent-output.md diff --git a/.changeset/patch-fix-safe-output-agent-output.md b/.changeset/patch-fix-safe-output-agent-output.md new file mode 100644 index 00000000000..41f7b44f3cb --- /dev/null +++ b/.changeset/patch-fix-safe-output-agent-output.md @@ -0,0 +1,5 @@ +--- +"gh-aw": patch +--- + +Fixed empty GITHUB_AW_AGENT_OUTPUT in safe output jobs by downloading agent_output.json artifact instead of relying on job outputs