diff --git a/.github/workflows/ai-triage-campaign.lock.yml b/.github/workflows/ai-triage-campaign.lock.yml index 788ee5253d9..f652124c7fa 100644 --- a/.github/workflows/ai-triage-campaign.lock.yml +++ b/.github/workflows/ai-triage-campaign.lock.yml @@ -3874,21 +3874,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/archie.lock.yml b/.github/workflows/archie.lock.yml index 8e4a3d71bc1..8e8256197d2 100644 --- a/.github/workflows/archie.lock.yml +++ b/.github/workflows/archie.lock.yml @@ -477,6 +477,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: archie GH_AW_WORKFLOW_NAME: "Archie" + GH_AW_WORKFLOW_FILE: "archie.lock.yml" with: script: | async function main() { @@ -684,12 +685,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -725,7 +746,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -778,7 +800,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4985,21 +5008,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index a3481691f9b..f44874a2186 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -4187,21 +4187,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index ef873186234..a9bdf81808d 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -4462,21 +4462,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/blog-auditor.lock.yml b/.github/workflows/blog-auditor.lock.yml index 08d784d4ea9..597a2cab1f1 100644 --- a/.github/workflows/blog-auditor.lock.yml +++ b/.github/workflows/blog-auditor.lock.yml @@ -3799,21 +3799,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index f8396542f5d..243f8bee76b 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -458,6 +458,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: brave GH_AW_WORKFLOW_NAME: "Brave Web Search Agent" + GH_AW_WORKFLOW_FILE: "brave.lock.yml" with: script: | async function main() { @@ -665,12 +666,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -706,7 +727,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -759,7 +781,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4832,21 +4855,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/changeset.lock.yml b/.github/workflows/changeset.lock.yml index f5ac05b9007..5474b47860b 100644 --- a/.github/workflows/changeset.lock.yml +++ b/.github/workflows/changeset.lock.yml @@ -465,6 +465,7 @@ jobs: env: GH_AW_REACTION: rocket GH_AW_WORKFLOW_NAME: "Changeset Generator" + GH_AW_WORKFLOW_FILE: "changeset.lock.yml" with: script: | async function main() { @@ -672,12 +673,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -713,7 +734,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -766,7 +788,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -5102,21 +5125,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml index 3c0dce77d6f..a97e6956078 100644 --- a/.github/workflows/ci-doctor.lock.yml +++ b/.github/workflows/ci-doctor.lock.yml @@ -4308,21 +4308,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/cli-consistency-checker.lock.yml b/.github/workflows/cli-consistency-checker.lock.yml index 8d095409d40..57414df6b67 100644 --- a/.github/workflows/cli-consistency-checker.lock.yml +++ b/.github/workflows/cli-consistency-checker.lock.yml @@ -4225,21 +4225,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/cli-version-checker.lock.yml b/.github/workflows/cli-version-checker.lock.yml index 33cc1e7f820..7396a2ea3d6 100644 --- a/.github/workflows/cli-version-checker.lock.yml +++ b/.github/workflows/cli-version-checker.lock.yml @@ -4415,21 +4415,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/cloclo.lock.yml b/.github/workflows/cloclo.lock.yml index f950eb46ca2..dc4015fe6c7 100644 --- a/.github/workflows/cloclo.lock.yml +++ b/.github/workflows/cloclo.lock.yml @@ -508,6 +508,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: cloclo GH_AW_WORKFLOW_NAME: "Claude Command Processor - /cloclo" + GH_AW_WORKFLOW_FILE: "cloclo.lock.yml" with: script: | async function main() { @@ -715,12 +716,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -756,7 +777,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -809,7 +831,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -5176,21 +5199,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/commit-changes-analyzer.lock.yml b/.github/workflows/commit-changes-analyzer.lock.yml index 42698166cdb..42ae057695a 100644 --- a/.github/workflows/commit-changes-analyzer.lock.yml +++ b/.github/workflows/commit-changes-analyzer.lock.yml @@ -3728,21 +3728,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/copilot-agent-analysis.lock.yml b/.github/workflows/copilot-agent-analysis.lock.yml index 92dda2eedaf..d5fb7ce404b 100644 --- a/.github/workflows/copilot-agent-analysis.lock.yml +++ b/.github/workflows/copilot-agent-analysis.lock.yml @@ -4091,21 +4091,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml index 2eeb8e478d7..883c78b7b2b 100644 --- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml +++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml @@ -4962,21 +4962,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/copilot-pr-prompt-analysis.lock.yml b/.github/workflows/copilot-pr-prompt-analysis.lock.yml index f5ed1dc220d..bbb1403c3d0 100644 --- a/.github/workflows/copilot-pr-prompt-analysis.lock.yml +++ b/.github/workflows/copilot-pr-prompt-analysis.lock.yml @@ -4528,21 +4528,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/copilot-session-insights.lock.yml b/.github/workflows/copilot-session-insights.lock.yml index c83ea65ce39..1386ba0af45 100644 --- a/.github/workflows/copilot-session-insights.lock.yml +++ b/.github/workflows/copilot-session-insights.lock.yml @@ -5009,21 +5009,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/craft.lock.yml b/.github/workflows/craft.lock.yml index 19808e3bbed..24b5d225fcd 100644 --- a/.github/workflows/craft.lock.yml +++ b/.github/workflows/craft.lock.yml @@ -459,6 +459,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: craft GH_AW_WORKFLOW_NAME: "Workflow Craft Agent" + GH_AW_WORKFLOW_FILE: "craft.lock.yml" with: script: | async function main() { @@ -666,12 +667,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -707,7 +728,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -760,7 +782,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -5193,21 +5216,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/daily-code-metrics.lock.yml b/.github/workflows/daily-code-metrics.lock.yml index 9a48c087cf7..7d676b9037a 100644 --- a/.github/workflows/daily-code-metrics.lock.yml +++ b/.github/workflows/daily-code-metrics.lock.yml @@ -4073,21 +4073,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index 30e79cf5d7d..6106eb96c53 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -3865,21 +3865,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml index 5e5b0e69bf5..f11da7fbf6a 100644 --- a/.github/workflows/daily-file-diet.lock.yml +++ b/.github/workflows/daily-file-diet.lock.yml @@ -3439,21 +3439,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index 99c7c559735..33c42c54d48 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -4956,21 +4956,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/daily-multi-device-docs-tester.lock.yml b/.github/workflows/daily-multi-device-docs-tester.lock.yml index 2b8a0316ed7..0bdc0ffada2 100644 --- a/.github/workflows/daily-multi-device-docs-tester.lock.yml +++ b/.github/workflows/daily-multi-device-docs-tester.lock.yml @@ -3592,21 +3592,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index b0e9cdaa8de..4098c0113db 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -4965,21 +4965,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index 8bd0978ac89..6aa6314a737 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -4809,21 +4809,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/daily-team-status.lock.yml b/.github/workflows/daily-team-status.lock.yml index 0c2b578c3b3..6588afcb4f9 100644 --- a/.github/workflows/daily-team-status.lock.yml +++ b/.github/workflows/daily-team-status.lock.yml @@ -3755,21 +3755,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/dependabot-go-checker.lock.yml b/.github/workflows/dependabot-go-checker.lock.yml index 1d56fcd3d1c..8a00d9a36ec 100644 --- a/.github/workflows/dependabot-go-checker.lock.yml +++ b/.github/workflows/dependabot-go-checker.lock.yml @@ -3892,21 +3892,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml index 1af1d74e58d..b27b299d528 100644 --- a/.github/workflows/dev-hawk.lock.yml +++ b/.github/workflows/dev-hawk.lock.yml @@ -4195,21 +4195,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index d5b8471c37b..c1a16698f1b 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -4013,21 +4013,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml index 3edde9bc6b3..0b22189aa90 100644 --- a/.github/workflows/developer-docs-consolidator.lock.yml +++ b/.github/workflows/developer-docs-consolidator.lock.yml @@ -4416,21 +4416,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 40719b6f4b1..7ebb5fb8fa5 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -4021,21 +4021,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/docs-noob-tester.lock.yml b/.github/workflows/docs-noob-tester.lock.yml index aede717a19f..7e75abba9ca 100644 --- a/.github/workflows/docs-noob-tester.lock.yml +++ b/.github/workflows/docs-noob-tester.lock.yml @@ -4247,21 +4247,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/duplicate-code-detector.lock.yml b/.github/workflows/duplicate-code-detector.lock.yml index 775655d70ca..e69855b246c 100644 --- a/.github/workflows/duplicate-code-detector.lock.yml +++ b/.github/workflows/duplicate-code-detector.lock.yml @@ -3352,21 +3352,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/example-workflow-analyzer.lock.yml b/.github/workflows/example-workflow-analyzer.lock.yml index d991b3cfe0c..821eb1a98a5 100644 --- a/.github/workflows/example-workflow-analyzer.lock.yml +++ b/.github/workflows/example-workflow-analyzer.lock.yml @@ -3510,21 +3510,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/github-mcp-tools-report.lock.yml b/.github/workflows/github-mcp-tools-report.lock.yml index 6857dc77f8d..fc427c64bf2 100644 --- a/.github/workflows/github-mcp-tools-report.lock.yml +++ b/.github/workflows/github-mcp-tools-report.lock.yml @@ -4238,21 +4238,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 52e68e3c9e0..fe1937c1f58 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -4994,21 +4994,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/go-logger.lock.yml b/.github/workflows/go-logger.lock.yml index 37a01d7ba19..f6573490b45 100644 --- a/.github/workflows/go-logger.lock.yml +++ b/.github/workflows/go-logger.lock.yml @@ -3982,21 +3982,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/go-pattern-detector.lock.yml b/.github/workflows/go-pattern-detector.lock.yml index dc8e4f3a611..bff8a3c3f04 100644 --- a/.github/workflows/go-pattern-detector.lock.yml +++ b/.github/workflows/go-pattern-detector.lock.yml @@ -3550,21 +3550,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/grumpy-reviewer.lock.yml b/.github/workflows/grumpy-reviewer.lock.yml index 0abf4e6b1b4..6899d7dae21 100644 --- a/.github/workflows/grumpy-reviewer.lock.yml +++ b/.github/workflows/grumpy-reviewer.lock.yml @@ -464,6 +464,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: grumpy GH_AW_WORKFLOW_NAME: "Grumpy Code Reviewer 🔥" + GH_AW_WORKFLOW_FILE: "grumpy-reviewer.lock.yml" with: script: | async function main() { @@ -671,12 +672,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -712,7 +733,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -765,7 +787,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4888,21 +4911,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/instructions-janitor.lock.yml b/.github/workflows/instructions-janitor.lock.yml index c6c2df6fcf9..4b4fbe777bf 100644 --- a/.github/workflows/instructions-janitor.lock.yml +++ b/.github/workflows/instructions-janitor.lock.yml @@ -3861,21 +3861,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/issue-classifier.lock.yml b/.github/workflows/issue-classifier.lock.yml index 3deadb96e8d..df8dc3971af 100644 --- a/.github/workflows/issue-classifier.lock.yml +++ b/.github/workflows/issue-classifier.lock.yml @@ -454,6 +454,7 @@ jobs: env: GH_AW_REACTION: eyes GH_AW_WORKFLOW_NAME: "Issue Classifier" + GH_AW_WORKFLOW_FILE: "issue-classifier.lock.yml" with: script: | async function main() { @@ -661,12 +662,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -702,7 +723,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -755,7 +777,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -3345,21 +3368,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/lockfile-stats.lock.yml b/.github/workflows/lockfile-stats.lock.yml index a3ceb5acc6a..4940b1c2538 100644 --- a/.github/workflows/lockfile-stats.lock.yml +++ b/.github/workflows/lockfile-stats.lock.yml @@ -3865,21 +3865,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index b8ce54283f7..96c2714b2e0 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -4760,21 +4760,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/mergefest.lock.yml b/.github/workflows/mergefest.lock.yml index 1e671d9f547..4c10ed9e0e5 100644 --- a/.github/workflows/mergefest.lock.yml +++ b/.github/workflows/mergefest.lock.yml @@ -171,6 +171,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: mergefest GH_AW_WORKFLOW_NAME: "Mergefest" + GH_AW_WORKFLOW_FILE: "mergefest.lock.yml" with: script: | async function main() { @@ -378,12 +379,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -419,7 +440,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -472,7 +494,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4572,21 +4595,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index b48942011eb..33aef5c86cf 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -3584,21 +3584,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index 4c6929f9300..5256218225b 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -480,6 +480,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: summarize GH_AW_WORKFLOW_NAME: "Resource Summarizer Agent" + GH_AW_WORKFLOW_FILE: "pdf-summary.lock.yml" with: script: | async function main() { @@ -687,12 +688,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -728,7 +749,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -781,7 +803,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4938,21 +4961,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index ce9a6d954ca..2c99d613374 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -463,6 +463,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: plan GH_AW_WORKFLOW_NAME: "Plan Command" + GH_AW_WORKFLOW_FILE: "plan.lock.yml" with: script: | async function main() { @@ -670,12 +671,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -711,7 +732,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -764,7 +786,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4760,21 +4783,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 7f451a3d493..ad933f70551 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -495,6 +495,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: poem-bot GH_AW_WORKFLOW_NAME: "Poem Bot - A Creative Agentic Workflow" + GH_AW_WORKFLOW_FILE: "poem-bot.lock.yml" with: script: | async function main() { @@ -702,12 +703,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -743,7 +764,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -796,7 +818,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -5429,21 +5452,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/pr-nitpick-reviewer.lock.yml b/.github/workflows/pr-nitpick-reviewer.lock.yml index 013ac06ab58..bd7026397c1 100644 --- a/.github/workflows/pr-nitpick-reviewer.lock.yml +++ b/.github/workflows/pr-nitpick-reviewer.lock.yml @@ -213,6 +213,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: nit GH_AW_WORKFLOW_NAME: "PR Nitpick Reviewer 🔍" + GH_AW_WORKFLOW_FILE: "pr-nitpick-reviewer.lock.yml" with: script: | async function main() { @@ -420,12 +421,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -461,7 +482,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -514,7 +536,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4948,21 +4971,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/prompt-clustering-analysis.lock.yml b/.github/workflows/prompt-clustering-analysis.lock.yml index 1237fcec3df..29ac7e3ae50 100644 --- a/.github/workflows/prompt-clustering-analysis.lock.yml +++ b/.github/workflows/prompt-clustering-analysis.lock.yml @@ -4205,21 +4205,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 3f7d5cb55f9..ca3711922ef 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -5127,21 +5127,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 6627a64a91d..a815a32d00d 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -503,6 +503,7 @@ jobs: GH_AW_REACTION: rocket GH_AW_COMMAND: q GH_AW_WORKFLOW_NAME: "Q" + GH_AW_WORKFLOW_FILE: "q.lock.yml" with: script: | async function main() { @@ -710,12 +711,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -751,7 +772,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -804,7 +826,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -5486,21 +5509,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index 38e9b072548..f321b4a11a3 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -3850,21 +3850,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml index fe7c46867ea..4d431c91ec3 100644 --- a/.github/workflows/repository-quality-improver.lock.yml +++ b/.github/workflows/repository-quality-improver.lock.yml @@ -4368,21 +4368,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index 264fe32ed4f..766ea973bb0 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -4151,21 +4151,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/safe-output-health.lock.yml b/.github/workflows/safe-output-health.lock.yml index c5af9d03766..7c39e0695ba 100644 --- a/.github/workflows/safe-output-health.lock.yml +++ b/.github/workflows/safe-output-health.lock.yml @@ -3998,21 +3998,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/schema-consistency-checker.lock.yml b/.github/workflows/schema-consistency-checker.lock.yml index 04741fee0a7..5a18b978c8e 100644 --- a/.github/workflows/schema-consistency-checker.lock.yml +++ b/.github/workflows/schema-consistency-checker.lock.yml @@ -3871,21 +3871,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/scout.lock.yml b/.github/workflows/scout.lock.yml index cf2cfc06101..e7f0e64b21d 100644 --- a/.github/workflows/scout.lock.yml +++ b/.github/workflows/scout.lock.yml @@ -506,6 +506,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: scout GH_AW_WORKFLOW_NAME: "Scout" + GH_AW_WORKFLOW_FILE: "scout.lock.yml" with: script: | async function main() { @@ -713,12 +714,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -754,7 +775,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -807,7 +829,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4982,21 +5005,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/security-fix-pr.lock.yml b/.github/workflows/security-fix-pr.lock.yml index eebe06e2c0d..337f1e51c3c 100644 --- a/.github/workflows/security-fix-pr.lock.yml +++ b/.github/workflows/security-fix-pr.lock.yml @@ -3809,21 +3809,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/semantic-function-refactor.lock.yml b/.github/workflows/semantic-function-refactor.lock.yml index ddf88f7aef6..c6e2997ff54 100644 --- a/.github/workflows/semantic-function-refactor.lock.yml +++ b/.github/workflows/semantic-function-refactor.lock.yml @@ -3959,21 +3959,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index c4bf235b779..e0ea8e6616c 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -4018,21 +4018,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index 0f1dccb874e..ace0f959c68 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -3567,21 +3567,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 0f1237f59b1..7e32e028e49 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -4502,21 +4502,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/smoke-detector.lock.yml b/.github/workflows/smoke-detector.lock.yml index 50e1c737d12..ac75d79797b 100644 --- a/.github/workflows/smoke-detector.lock.yml +++ b/.github/workflows/smoke-detector.lock.yml @@ -204,6 +204,7 @@ jobs: env: GH_AW_REACTION: eyes GH_AW_WORKFLOW_NAME: "Smoke Detector - Smoke Test Failure Investigator" + GH_AW_WORKFLOW_FILE: "smoke-detector.lock.yml" with: script: | async function main() { @@ -411,12 +412,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -452,7 +473,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -505,7 +527,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4582,21 +4605,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/static-analysis-report.lock.yml b/.github/workflows/static-analysis-report.lock.yml index 1cdbde24ae5..af588957df1 100644 --- a/.github/workflows/static-analysis-report.lock.yml +++ b/.github/workflows/static-analysis-report.lock.yml @@ -3886,21 +3886,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/super-linter.lock.yml b/.github/workflows/super-linter.lock.yml index d980648f5fd..23a0238267a 100644 --- a/.github/workflows/super-linter.lock.yml +++ b/.github/workflows/super-linter.lock.yml @@ -3923,21 +3923,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 3fec90f9807..79df4d9d08b 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -5178,21 +5178,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/test-assign-milestone-allowed.lock.yml b/.github/workflows/test-assign-milestone-allowed.lock.yml index 33211275375..fbf1dfc4134 100644 --- a/.github/workflows/test-assign-milestone-allowed.lock.yml +++ b/.github/workflows/test-assign-milestone-allowed.lock.yml @@ -3619,21 +3619,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/test-claude-assign-milestone.lock.yml b/.github/workflows/test-claude-assign-milestone.lock.yml index 06eb952ac14..45f46c4fe74 100644 --- a/.github/workflows/test-claude-assign-milestone.lock.yml +++ b/.github/workflows/test-claude-assign-milestone.lock.yml @@ -3612,21 +3612,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/test-close-discussion.lock.yml b/.github/workflows/test-close-discussion.lock.yml index ec2301ebf31..3f7f72f6850 100644 --- a/.github/workflows/test-close-discussion.lock.yml +++ b/.github/workflows/test-close-discussion.lock.yml @@ -3997,21 +3997,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/test-codex-assign-milestone.lock.yml b/.github/workflows/test-codex-assign-milestone.lock.yml index a4c578eca96..36852b4860c 100644 --- a/.github/workflows/test-codex-assign-milestone.lock.yml +++ b/.github/workflows/test-codex-assign-milestone.lock.yml @@ -3304,21 +3304,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/test-copilot-assign-milestone.lock.yml b/.github/workflows/test-copilot-assign-milestone.lock.yml index 8cf1fe3bf5f..0e68fe306a8 100644 --- a/.github/workflows/test-copilot-assign-milestone.lock.yml +++ b/.github/workflows/test-copilot-assign-milestone.lock.yml @@ -3864,21 +3864,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/test-ollama-threat-detection.lock.yml b/.github/workflows/test-ollama-threat-detection.lock.yml index 59133c96eca..35f13963459 100644 --- a/.github/workflows/test-ollama-threat-detection.lock.yml +++ b/.github/workflows/test-ollama-threat-detection.lock.yml @@ -3646,21 +3646,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index b6ea302335b..9e8f40673d2 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -188,6 +188,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: tidy GH_AW_WORKFLOW_NAME: "Tidy" + GH_AW_WORKFLOW_FILE: "tidy.lock.yml" with: script: | async function main() { @@ -395,12 +396,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -436,7 +457,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -489,7 +511,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4376,21 +4399,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/typist.lock.yml b/.github/workflows/typist.lock.yml index 2760282ff04..3a58dc22797 100644 --- a/.github/workflows/typist.lock.yml +++ b/.github/workflows/typist.lock.yml @@ -4029,21 +4029,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index f0d470ce77b..10d195b85ce 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -190,6 +190,7 @@ jobs: GH_AW_REACTION: eyes GH_AW_COMMAND: unbloat GH_AW_WORKFLOW_NAME: "Documentation Unbloat" + GH_AW_WORKFLOW_FILE: "unbloat-docs.lock.yml" with: script: | async function main() { @@ -397,12 +398,32 @@ jobs: } throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } + function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + const additionalLinks = []; + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + return linkText; + } async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; if (eventName === "discussion") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -438,7 +459,8 @@ jobs: return; } else if (eventName === "discussion_comment") { const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; const { repository } = await github.graphql( ` query($owner: String!, $repo: String!, $num: Int!) { @@ -491,7 +513,8 @@ jobs: default: eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, headers: { @@ -4892,21 +4915,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/video-analyzer.lock.yml b/.github/workflows/video-analyzer.lock.yml index ee76bc67c5f..31ec6cf931f 100644 --- a/.github/workflows/video-analyzer.lock.yml +++ b/.github/workflows/video-analyzer.lock.yml @@ -3937,21 +3937,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/.github/workflows/weekly-issue-summary.lock.yml b/.github/workflows/weekly-issue-summary.lock.yml index afeb4a80643..34ebdb40ac9 100644 --- a/.github/workflows/weekly-issue-summary.lock.yml +++ b/.github/workflows/weekly-issue-summary.lock.yml @@ -4717,21 +4717,21 @@ jobs: let message; if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } if (noopMessages.length > 0) { message += "\n\n"; diff --git a/docs/src/content/docs/labs.mdx b/docs/src/content/docs/labs.mdx index 1e24bd7d3c9..34e26378392 100644 --- a/docs/src/content/docs/labs.mdx +++ b/docs/src/content/docs/labs.mdx @@ -77,6 +77,7 @@ These are experimental agentic workflows used by the GitHub Next team to learn, | [Technical Doc Writer](https://github.com/githubnext/gh-aw/blob/main/.github/workflows/technical-doc-writer.md) | copilot | [![Technical Doc Writer](https://github.com/githubnext/gh-aw/actions/workflows/technical-doc-writer.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/technical-doc-writer.lock.yml) | - | - | | [Test Assign Milestone with Allowed List](https://github.com/githubnext/gh-aw/blob/main/.github/workflows/test-assign-milestone-allowed.md) | claude | [![Test Assign Milestone with Allowed List](https://github.com/githubnext/gh-aw/actions/workflows/test-assign-milestone-allowed.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-assign-milestone-allowed.lock.yml) | - | - | | [Test Claude Assign Milestone](https://github.com/githubnext/gh-aw/blob/main/.github/workflows/test-claude-assign-milestone.md) | claude | [![Test Claude Assign Milestone](https://github.com/githubnext/gh-aw/actions/workflows/test-claude-assign-milestone.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-claude-assign-milestone.lock.yml) | - | - | +| [Test Close Discussion](https://github.com/githubnext/gh-aw/blob/main/.github/workflows/test-close-discussion.md) | copilot | [![Test Close Discussion](https://github.com/githubnext/gh-aw/actions/workflows/test-close-discussion.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-close-discussion.lock.yml) | - | - | | [Test Codex Assign Milestone](https://github.com/githubnext/gh-aw/blob/main/.github/workflows/test-codex-assign-milestone.md) | codex | [![Test Codex Assign Milestone](https://github.com/githubnext/gh-aw/actions/workflows/test-codex-assign-milestone.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-codex-assign-milestone.lock.yml) | - | - | | [Test Copilot Assign Milestone](https://github.com/githubnext/gh-aw/blob/main/.github/workflows/test-copilot-assign-milestone.md) | copilot | [![Test Copilot Assign Milestone](https://github.com/githubnext/gh-aw/actions/workflows/test-copilot-assign-milestone.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-copilot-assign-milestone.lock.yml) | - | - | | [Test jqschema](https://github.com/githubnext/gh-aw/blob/main/.github/workflows/test-jqschema.md) | copilot | [![Test jqschema](https://github.com/githubnext/gh-aw/actions/workflows/test-jqschema.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-jqschema.lock.yml) | - | - | diff --git a/docs/src/content/docs/reference/frontmatter-full.md b/docs/src/content/docs/reference/frontmatter-full.md index 31f39c78923..dec1b55f6f9 100644 --- a/docs/src/content/docs/reference/frontmatter-full.md +++ b/docs/src/content/docs/reference/frontmatter-full.md @@ -851,9 +851,11 @@ network: args: [] # Array of strings - # AWF version to use (empty = latest release) + # AWF version to use (empty = latest release). Can be a string (e.g., 'v1.0.0', + # 'latest') or number (e.g., 20, 3.11). Numeric values are automatically converted + # to strings at runtime. # (optional) - version: "example-value" + version: null # AWF log level (default: info). Valid values: debug, info, warn, error # (optional) @@ -892,30 +894,31 @@ post-steps: [] # (optional) # This field supports multiple formats (oneOf): -# Option 1: Simple engine name: 'copilot' (GitHub Copilot CLI, recommended) or -# 'custom' (user-defined steps). Note: 'claude' and 'codex' are available but -# experimental. -engine: "copilot" +# Option 1: Simple engine name: 'claude' (default, Claude Code), 'copilot' (GitHub +# Copilot CLI), 'codex' (OpenAI Codex CLI), or 'custom' (user-defined steps) +engine: "claude" # Option 2: Extended engine configuration object with advanced options for model # selection, turn limiting, environment variables, and custom steps engine: - # AI engine identifier: 'copilot' (GitHub Copilot CLI), or 'custom' (user-defined - # GitHub Actions steps). Note: 'claude' and 'codex' are available but experimental. - id: "copilot" + # AI engine identifier: 'claude' (Claude Code), 'codex' (OpenAI Codex CLI), + # 'copilot' (GitHub Copilot CLI), or 'custom' (user-defined GitHub Actions steps) + id: "claude" - # Optional version of the AI engine action (e.g., 'beta', 'stable'). Has sensible - # defaults and can typically be omitted. + # Optional version of the AI engine action (e.g., 'beta', 'stable', 20). Has + # sensible defaults and can typically be omitted. Numeric values are automatically + # converted to strings at runtime. # (optional) - version: "example-value" + version: null - # Optional specific LLM model to use (e.g., 'gpt-5', 'claude-sonnet-4'). Has - # sensible defaults and can typically be omitted. + # Optional specific LLM model to use (e.g., 'claude-3-5-sonnet-20241022', + # 'gpt-4'). Has sensible defaults and can typically be omitted. # (optional) model: "example-value" # Maximum number of chat iterations per run. Helps prevent runaway loops and - # control costs. Has sensible defaults and can typically be omitted. + # control costs. Has sensible defaults and can typically be omitted. Note: Only + # supported by the claude engine. # (optional) max-turns: 1 @@ -942,6 +945,10 @@ engine: # (optional) cancel-in-progress: true + # Custom user agent string for GitHub MCP server configuration (codex engine only) + # (optional) + user-agent: "example-value" + # Custom environment variables to pass to the AI engine, including secret # overrides (e.g., OPENAI_API_KEY: ${{ secrets.CUSTOM_KEY }}) # (optional) @@ -979,6 +986,11 @@ engine: # (optional) description: "Description of the workflow" + # Additional TOML configuration text that will be appended to the generated + # config.toml in the action (codex engine only) + # (optional) + config: "example-value" + # Optional array of command-line arguments to pass to the AI engine CLI. These # arguments are injected after all other args but before the prompt. # (optional) @@ -1020,9 +1032,10 @@ tools: mode: "local" # Optional version specification for the GitHub MCP server (used with 'local' - # type) + # type). Can be a string (e.g., 'v1.0.0', 'latest') or number (e.g., 20, 3.11). + # Numeric values are automatically converted to strings at runtime. # (optional) - version: "example-value" + version: null # Optional additional arguments to append to the generated MCP server command # (used with 'local' type) @@ -1109,9 +1122,10 @@ tools: # Option 2: Playwright tool configuration with custom version and domain # restrictions playwright: - # Optional Playwright container version (e.g., 'v1.41.0') + # Optional Playwright container version (e.g., 'v1.41.0', 1.41, 20). Numeric + # values are automatically converted to strings at runtime. # (optional) - version: "example-value" + version: null # Domains allowed for Playwright browser network access. Defaults to localhost # only for security. @@ -1358,18 +1372,13 @@ safe-outputs: # (optional) title-prefix: "example-value" - # Optional discussion category. Can be a category ID (string or number), category - # name, or category slug/route. If not specified, uses the first available - # category. Matched first against category IDs, then against category names, then - # against category slugs. + # Optional discussion category. Can be a category ID (string or numeric value), + # category name, or category slug/route. If not specified, uses the first + # available category. Matched first against category IDs, then against category + # names, then against category slugs. Numeric values are automatically converted + # to strings at runtime. # (optional) - # This field supports multiple formats (oneOf): - - # Option 1: Discussion category name or ID - category: "example-value" - - # Option 2: Discussion category ID as a number - category: 1 + category: null # Maximum number of discussions to create (default: 1) # (optional) @@ -1391,6 +1400,47 @@ safe-outputs: # (optional) # This field supports multiple formats (oneOf): + # Option 1: Configuration for closing GitHub discussions with comment and + # resolution from agentic workflow output + close-discussion: + # Only close discussions that have all of these labels + # (optional) + required-labels: [] + # Array of strings + + # Only close discussions with this title prefix + # (optional) + required-title-prefix: "example-value" + + # Only close discussions in this category + # (optional) + required-category: "example-value" + + # Target for closing: 'triggering' (default, current discussion), or '*' (any + # discussion with discussion_number field) + # (optional) + target: "example-value" + + # Maximum number of discussions to close (default: 1) + # (optional) + max: 1 + + # Target repository in format 'owner/repo' for cross-repository operations. Takes + # precedence over trial target repo settings. + # (optional) + target-repo: "example-value" + + # GitHub token to use for this specific output type. Overrides global github-token + # if specified. + # (optional) + github-token: "${{ secrets.GITHUB_TOKEN }}" + + # Option 2: Enable discussion closing with default configuration + close-discussion: null + + # (optional) + # This field supports multiple formats (oneOf): + # Option 1: Configuration for automatically creating GitHub issue or pull request # comments from AI workflow output. The main job does not need write permissions. add-comment: @@ -1571,6 +1621,35 @@ safe-outputs: # (optional) # This field supports multiple formats (oneOf): + # Option 1: Null configuration allows assigning any milestones + assign-milestone: null + + # Option 2: Configuration for assigning issues to milestones from agentic workflow + # output + assign-milestone: + # Optional list of allowed milestone titles that can be assigned. If omitted, any + # milestones are allowed. + # (optional) + allowed: [] + # Array of strings + + # Optional maximum number of milestone assignments (default: 1) + # (optional) + max: 1 + + # Target repository in format 'owner/repo' for cross-repository milestone + # assignment. Takes precedence over trial target repo settings. + # (optional) + target-repo: "example-value" + + # GitHub token to use for this specific output type. Overrides global github-token + # if specified. + # (optional) + github-token: "${{ secrets.GITHUB_TOKEN }}" + + # (optional) + # This field supports multiple formats (oneOf): + # Option 1: Configuration for updating GitHub issues from agentic workflow output update-issue: # Allow updating issue status (open/closed) - presence of key indicates field can diff --git a/pkg/workflow/compiler_jobs.go b/pkg/workflow/compiler_jobs.go index 2fa92f0b167..1b116aa42e5 100644 --- a/pkg/workflow/compiler_jobs.go +++ b/pkg/workflow/compiler_jobs.go @@ -667,6 +667,16 @@ func (c *Compiler) buildActivationJob(data *WorkflowData, preActivationJobCreate steps = append(steps, fmt.Sprintf(" GH_AW_COMMAND: %s\n", data.Command)) } steps = append(steps, fmt.Sprintf(" GH_AW_WORKFLOW_NAME: %q\n", data.Name)) + steps = append(steps, fmt.Sprintf(" GH_AW_WORKFLOW_FILE: %q\n", lockFilename)) + + // Add workflow source and source URL if present + if data.Source != "" { + steps = append(steps, fmt.Sprintf(" GH_AW_WORKFLOW_SOURCE: %q\n", data.Source)) + sourceURL := buildSourceURL(data.Source) + if sourceURL != "" { + steps = append(steps, fmt.Sprintf(" GH_AW_WORKFLOW_SOURCE_URL: %q\n", sourceURL)) + } + } steps = append(steps, " with:\n") steps = append(steps, " script: |\n") diff --git a/pkg/workflow/js/add_reaction_and_edit_comment.cjs b/pkg/workflow/js/add_reaction_and_edit_comment.cjs index 6c455f2a732..d85f0de8502 100644 --- a/pkg/workflow/js/add_reaction_and_edit_comment.cjs +++ b/pkg/workflow/js/add_reaction_and_edit_comment.cjs @@ -283,6 +283,41 @@ async function getDiscussionCommentId(owner, repo, discussionNumber, commentId) throw new Error(`Discussion comment node ID not found in event payload for comment ${commentId}`); } +/** + * Build the workflow link text with source and run ID + * @param {string} workflowName - Name of the workflow + * @param {string} runUrl - URL of the workflow run + * @param {number} runId - Run ID + * @param {string} workflowFile - Lock filename (e.g., "test.lock.yml") + * @param {string} workflowSource - Source of the workflow (owner/repo/path@ref) + * @param {string} workflowSourceURL - URL to the workflow source file + * @returns {string} Formatted workflow link text + */ +function buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL) { + // Extract repository info from runUrl to build workflow URL + // runUrl format: https://github.com/owner/repo/actions/runs/12345 + const workflowUrl = workflowFile ? runUrl.replace(/\/runs\/\d+$/, `/workflows/${workflowFile}`) : runUrl; + + let linkText = `Agentic Workflow [${workflowName}](${workflowUrl})`; + + // Add source link and run ID in parentheses + const additionalLinks = []; + + if (workflowSourceURL) { + additionalLinks.push(`[source](${workflowSourceURL})`); + } + + if (runId) { + additionalLinks.push(`[run #${runId}](${runUrl})`); + } + + if (additionalLinks.length > 0) { + linkText += ` (${additionalLinks.join(", ")})`; + } + + return linkText; +} + /** * Add a comment with a workflow run link * @param {string} endpoint - The GitHub API endpoint to create the comment (or special format for discussions) @@ -293,12 +328,17 @@ async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { try { // Get workflow name from environment variable const workflowName = process.env.GH_AW_WORKFLOW_NAME || "Workflow"; + const workflowFile = process.env.GH_AW_WORKFLOW_FILE || ""; + const workflowSource = process.env.GH_AW_WORKFLOW_SOURCE || ""; + const workflowSourceURL = process.env.GH_AW_WORKFLOW_SOURCE_URL || ""; + const runId = context.runId; // Handle discussion events specially if (eventName === "discussion") { // Parse discussion number from special format: "discussion:NUMBER" const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion.`; // Create a new comment on the discussion using GraphQL const { repository } = await github.graphql( @@ -340,7 +380,8 @@ async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { } else if (eventName === "discussion_comment") { // Parse discussion number from special format: "discussion_comment:NUMBER:COMMENT_ID" const discussionNumber = parseInt(endpoint.split(":")[1], 10); - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this discussion comment.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this discussion comment.`; // Create a new comment on the discussion using GraphQL const { repository } = await github.graphql( @@ -403,7 +444,8 @@ async function addCommentWithWorkflowLink(endpoint, runUrl, eventName) { eventTypeDescription = "event"; } - const workflowLinkText = `Agentic [${workflowName}](${runUrl}) triggered by this ${eventTypeDescription}.`; + const workflowLinkPart = buildWorkflowLinkText(workflowName, runUrl, runId, workflowFile, workflowSource, workflowSourceURL); + const workflowLinkText = `${workflowLinkPart} triggered by this ${eventTypeDescription}.`; const createResponse = await github.request("POST " + endpoint, { body: workflowLinkText, diff --git a/pkg/workflow/js/add_reaction_and_edit_comment.test.cjs b/pkg/workflow/js/add_reaction_and_edit_comment.test.cjs index 0c2b0732301..23fef1148b5 100644 --- a/pkg/workflow/js/add_reaction_and_edit_comment.test.cjs +++ b/pkg/workflow/js/add_reaction_and_edit_comment.test.cjs @@ -88,6 +88,9 @@ describe("add_reaction_and_edit_comment.cjs", () => { delete process.env.GH_AW_REACTION; delete process.env.GH_AW_COMMAND; delete process.env.GH_AW_WORKFLOW_NAME; + delete process.env.GH_AW_WORKFLOW_FILE; + delete process.env.GH_AW_WORKFLOW_SOURCE; + delete process.env.GH_AW_WORKFLOW_SOURCE_URL; // Reset context to default state global.context.eventName = "issues"; @@ -174,7 +177,7 @@ describe("add_reaction_and_edit_comment.cjs", () => { expect(mockGithub.request).toHaveBeenCalledWith( "POST /repos/testowner/testrepo/issues/456/comments", expect.objectContaining({ - body: expect.stringContaining("Agentic [Test Workflow]"), + body: expect.stringContaining("Agentic Workflow [Test Workflow]"), }) ); @@ -385,7 +388,7 @@ describe("add_reaction_and_edit_comment.cjs", () => { expect(mockGithub.request).toHaveBeenCalledWith( "POST /repos/testowner/testrepo/issues/123/comments", expect.objectContaining({ - body: expect.stringContaining("Agentic [Test Workflow]"), + body: expect.stringContaining("Agentic Workflow [Test Workflow]"), }) ); @@ -424,7 +427,7 @@ describe("add_reaction_and_edit_comment.cjs", () => { expect(mockGithub.request).toHaveBeenCalledWith( "POST /repos/testowner/testrepo/issues/123/comments", expect.objectContaining({ - body: expect.stringContaining("Agentic [Test Workflow]"), + body: expect.stringContaining("Agentic Workflow [Test Workflow]"), }) ); @@ -466,7 +469,7 @@ describe("add_reaction_and_edit_comment.cjs", () => { expect(mockGithub.request).toHaveBeenCalledWith( "POST /repos/testowner/testrepo/issues/456/comments", expect.objectContaining({ - body: expect.stringContaining("Agentic [PR Review Bot]"), + body: expect.stringContaining("Agentic Workflow [PR Review Bot]"), }) ); @@ -538,7 +541,7 @@ describe("add_reaction_and_edit_comment.cjs", () => { expect.stringContaining("addDiscussionComment"), expect.objectContaining({ dId: "D_kwDOABcD1M4AaBbC", - body: expect.stringContaining("Agentic [Test Workflow]"), + body: expect.stringContaining("Agentic Workflow [Test Workflow]"), }) ); @@ -601,7 +604,7 @@ describe("add_reaction_and_edit_comment.cjs", () => { expect.stringContaining("addDiscussionComment"), expect.objectContaining({ dId: "D_kwDOABcD1M4AaBbC", - body: expect.stringContaining("Agentic [Discussion Bot]"), + body: expect.stringContaining("Agentic Workflow [Discussion Bot]"), replyToId: "DC_kwDOABcD1M4AaBbC", }) ); @@ -657,5 +660,37 @@ describe("add_reaction_and_edit_comment.cjs", () => { expect(mockCore.setFailed).toHaveBeenCalledWith("Unsupported event type: push"); }); + + it("should include workflow source and run ID in comment when available", async () => { + process.env.GH_AW_REACTION = "eyes"; + process.env.GH_AW_WORKFLOW_NAME = "Test Workflow"; + process.env.GH_AW_WORKFLOW_FILE = "test.lock.yml"; + process.env.GH_AW_WORKFLOW_SOURCE = "testowner/testrepo/.github/workflows/test.md@main"; + process.env.GH_AW_WORKFLOW_SOURCE_URL = "https://github.com/testowner/testrepo/tree/main/.github/workflows/test.md"; + + global.context.eventName = "issues"; + global.context.runId = 67890; + global.context.payload = { + issue: { number: 123 }, + repository: { html_url: "https://github.com/testowner/testrepo" }, + }; + + mockGithub.request.mockResolvedValue({ + data: { id: "987", html_url: "https://github.com/testowner/testrepo/issues/123#issuecomment-987" }, + }); + + // Execute the script + await eval(`(async () => { ${reactionScript} })()`); + + // Verify comment includes "Agentic Workflow", workflow name links to workflow page, source link, and run ID + expect(mockGithub.request).toHaveBeenCalledWith( + "POST /repos/testowner/testrepo/issues/123/comments", + expect.objectContaining({ + body: expect.stringMatching( + /Agentic Workflow \[Test Workflow\]\(.*actions\/workflows\/test\.lock\.yml\) \(\[source\]\(.*test\.md\), \[run #67890\]\(.*actions\/runs\/67890\)\) triggered by this issue\./ + ), + }) + ); + }); }); }); diff --git a/pkg/workflow/js/notify_comment_error.cjs b/pkg/workflow/js/notify_comment_error.cjs index 14edd8c7da7..b415b0ef5a9 100644 --- a/pkg/workflow/js/notify_comment_error.cjs +++ b/pkg/workflow/js/notify_comment_error.cjs @@ -73,22 +73,22 @@ async function main() { if (agentConclusion === "success") { statusEmoji = "✅"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) completed successfully.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) completed successfully.`; } else if (agentConclusion === "cancelled") { statusEmoji = "🚫"; statusText = "was cancelled"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "skipped") { statusEmoji = "⏭️"; statusText = "was skipped"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else if (agentConclusion === "timed_out") { statusEmoji = "⏱️"; statusText = "timed out"; - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } else { // Default to failure message - message = `${statusEmoji} Agentic [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; + message = `${statusEmoji} Agentic Workflow [${workflowName}](${runUrl}) ${statusText} and wasn't able to produce a result.`; } // Add noop messages to the comment if any diff --git a/pkg/workflow/js/update_activation_comment.test.cjs b/pkg/workflow/js/update_activation_comment.test.cjs index 6287d2835bc..82ed12eeb91 100644 --- a/pkg/workflow/js/update_activation_comment.test.cjs +++ b/pkg/workflow/js/update_activation_comment.test.cjs @@ -81,7 +81,7 @@ describe("update_activation_comment.cjs", () => { if (method.startsWith("GET")) { return { data: { - body: "Agentic [workflow](https://github.com/testowner/testrepo/actions/runs/12345) triggered by this issue.", + body: "Agentic Workflow [workflow](https://github.com/testowner/testrepo/actions/runs/12345) triggered by this issue.", }, }; } @@ -141,7 +141,7 @@ describe("update_activation_comment.cjs", () => { // Mock GET query return { node: { - body: "Agentic [workflow](https://github.com/testowner/testrepo/actions/runs/12345) triggered by this discussion.", + body: "Agentic Workflow [workflow](https://github.com/testowner/testrepo/actions/runs/12345) triggered by this discussion.", }, }; } @@ -423,7 +423,7 @@ describe("update_activation_comment.cjs", () => { if (method.startsWith("GET")) { return { data: { - body: "Agentic [workflow](https://github.com/testowner/testrepo/actions/runs/12345) triggered by this issue.", + body: "Agentic Workflow [workflow](https://github.com/testowner/testrepo/actions/runs/12345) triggered by this issue.", }, }; } @@ -474,7 +474,7 @@ describe("update_activation_comment.cjs", () => { // Mock GET query return { node: { - body: "Agentic [workflow](https://github.com/testowner/testrepo/actions/runs/12345) triggered by this discussion.", + body: "Agentic Workflow [workflow](https://github.com/testowner/testrepo/actions/runs/12345) triggered by this discussion.", }, }; }