From dd57a3345a05a92199b1d5daf8da164f6f7bb0bc Mon Sep 17 00:00:00 2001 From: minherz Date: Fri, 24 May 2024 15:43:19 -0700 Subject: [PATCH] chore: fix lines lost during rebase because rebasing was complex the implementation of disableComment parameter had to be fixed. --- src/index.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 06a0286..10627b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -133,12 +133,11 @@ async function deployToPreviewChannel(gacFilePath: string, channelId: string) { setOutput("expire_time", expireTime); setOutput("details_url", urls[0]); - const urlsListMarkdown = - urls.length === 1 - ? `[${urls[0]}](${urls[0]})` - : urls.map((url) => `- [${url}](${url})`).join("\n"); - - if (token && !!context.payload.pull_request && !!octokit) { + if (disableComment === "true") { + console.log( + `Commenting on PR is disabled with "disableComment: ${disableComment}"` + ); + } else if (token && !!context.payload.pull_request && !!octokit) { const commitId = context.payload.pull_request?.head.sha.substring(0, 7); await postChannelSuccessComment(octokit, context, deployment, commitId);