diff --git a/entry b/entry index 0f93686..9982ea7 100755 --- a/entry +++ b/entry @@ -106563,6 +106563,7 @@ async function reportProgress(ctx, { body }) { const existingCommentId = getProgressCommentId(); const issueNumber = ctx.toolState.prNumber ?? ctx.toolState.issueNumber ?? ctx.payload.event.issue_number; const isPlanMode = ctx.toolState.selectedMode === "Plan"; + const isGitHubActions2 = !!process.env.GITHUB_ACTIONS; if (existingCommentId) { const customParts = isPlanMode && issueNumber !== void 0 ? [buildImplementPlanLink(ctx.owner, ctx.name, issueNumber, existingCommentId)] : void 0; const bodyWithoutFooter = stripExistingFooter(body); @@ -106579,9 +106580,7 @@ async function reportProgress(ctx, { body }) { body: bodyWithFooter }); progressCommentWasUpdated = true; - if (process.env.GITHUB_ACTIONS) { - await core3.summary.addRaw(bodyWithFooter).write({ overwrite: true }); - } + if (isGitHubActions2) await core3.summary.addRaw(bodyWithFooter).write({ overwrite: true }); return { commentId: result2.data.id, url: result2.data.html_url, @@ -106616,9 +106615,7 @@ async function reportProgress(ctx, { body }) { comment_id: result.data.id, body: bodyWithPlanLink }); - if (process.env.GITHUB_ACTIONS) { - await core3.summary.addRaw(bodyWithPlanLink).write({ overwrite: true }); - } + if (isGitHubActions2) await core3.summary.addRaw(bodyWithPlanLink).write({ overwrite: true }); return { commentId: updateResult.data.id, url: updateResult.data.html_url, @@ -106626,9 +106623,7 @@ async function reportProgress(ctx, { body }) { action: "created" }; } - if (process.env.GITHUB_ACTIONS) { - await core3.summary.addRaw(initialBody).write({ overwrite: true }); - } + if (isGitHubActions2) await core3.summary.addRaw(initialBody).write({ overwrite: true }); return { commentId: result.data.id, url: result.data.html_url, diff --git a/mcp/comment.ts b/mcp/comment.ts index 481e78d..5de02a2 100644 --- a/mcp/comment.ts +++ b/mcp/comment.ts @@ -210,6 +210,7 @@ export async function reportProgress( const issueNumber = ctx.toolState.prNumber ?? ctx.toolState.issueNumber ?? ctx.payload.event.issue_number; const isPlanMode = ctx.toolState.selectedMode === "Plan"; + const isGitHubActions = !!process.env.GITHUB_ACTIONS; // if we already have a progress comment, update it if (existingCommentId) { @@ -236,9 +237,7 @@ export async function reportProgress( progressCommentWasUpdated = true; // update job summary with the same content as the progress comment - if (process.env.GITHUB_ACTIONS) { - await core.summary.addRaw(bodyWithFooter).write({ overwrite: true }); - } + if (isGitHubActions) await core.summary.addRaw(bodyWithFooter).write({ overwrite: true }); return { commentId: result.data.id, @@ -288,9 +287,7 @@ export async function reportProgress( }); // update job summary with the same content as the progress comment - if (process.env.GITHUB_ACTIONS) { - await core.summary.addRaw(bodyWithPlanLink).write({ overwrite: true }); - } + if (isGitHubActions) await core.summary.addRaw(bodyWithPlanLink).write({ overwrite: true }); return { commentId: updateResult.data.id, @@ -301,9 +298,7 @@ export async function reportProgress( } // update job summary with the same content as the progress comment - if (process.env.GITHUB_ACTIONS) { - await core.summary.addRaw(initialBody).write({ overwrite: true }); - } + if (isGitHubActions) await core.summary.addRaw(initialBody).write({ overwrite: true }); return { commentId: result.data.id,