From 3b104eb91f722d5faf7d294d62a26a6d22bb9fa1 Mon Sep 17 00:00:00 2001 From: Akshay Sharma Date: Mon, 21 Oct 2024 14:57:04 +0100 Subject: [PATCH] Fix undefined jobURL Signed-off-by: Akshay Sharma --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7ec71b7..2890146 100644 --- a/index.js +++ b/index.js @@ -142,7 +142,7 @@ async function waitJenkinsJob(jobName, queueItemUrl, timestamp) { `>>> Job '${jobName}' started executing. BuildUrl=${buildUrl}` ); jenkinsBuildUrl = - typeof jenkinsBuildUrl == "undefined" ? undefined : buildUrl; + typeof jenkinsBuildUrl == "undefined" ? buildUrl : buildUrl; if (jenkinsBuildUrl) { core.setOutput("jenkinsBuildUrl", jenkinsBuildUrl); @@ -168,7 +168,9 @@ async function waitJenkinsJob(jobName, queueItemUrl, timestamp) { } if (buildData.result == "SUCCESS") { - core.info(`Received 'SUCCESS' response from JenkinsAPI, successCount: ${successCount}`) + core.info( + `Received 'SUCCESS' response from JenkinsAPI, successCount: ${successCount}` + ); if (successCount >= SUCCESS_THRESHOLD) { core.info( `>>> Job '${buildData.fullDisplayName}' - ${jenkinsBuildUrl}, completed successfully!`