From c562c7f3de1f7baefe4dfebd07dac553f6b4321a Mon Sep 17 00:00:00 2001 From: Anh Hoang Nguyen Date: Tue, 19 Sep 2023 12:44:15 -0400 Subject: [PATCH] Forgot to remove redundance --- pipeline.groovy | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pipeline.groovy b/pipeline.groovy index a7a32c3..ff08875 100644 --- a/pipeline.groovy +++ b/pipeline.groovy @@ -45,13 +45,13 @@ pipeline { def jsonPayload = payload ? jsonSlurper.parseText(payload) : null payload ? { - WEBHOOK_SENDER_EMAIL= jsonPayload.sender.email : || currentBuild.getBuildCauses()[0].userId - WEBHOOK_SENDER_NAME=jsonPayload.sender.full_name || "Manually " + currentBuild.getBuildCauses()[0].shortDescription - WEBHOOK_SENDER_LOGIN=jsonPayload.sender.login || "N/A: Manual trigger" - COMMIT_HASH=jsonPayload.after || sh (script: "cd webhook-test && git log -n 1 --pretty=format:'%H'", returnStdout: true) - COMPARE_URL=jsonPayload.compare_url || "N/A: Manual trigger" - COMMIT_MSG=jsonPayload.head_commit.message || sh (script: "cd webhook-test && git log -n 1 --pretty=format:'%B'", returnStdout: true) - BRANCH_REF=jsonPayload.ref || "N/A: Manual trigger" + WEBHOOK_SENDER_EMAIL= jsonPayload.sender.email + WEBHOOK_SENDER_NAME=jsonPayload.sender.full_name + WEBHOOK_SENDER_LOGIN=jsonPayload.sender.login + COMMIT_HASH=jsonPayload.after + COMPARE_URL=jsonPayload.compare_url + COMMIT_MSG=jsonPayload.head_commit.message + BRANCH_REF=jsonPayload.ref } : { WEBHOOK_SENDER_EMAIL=currentBuild.getBuildCauses()[0].userId WEBHOOK_SENDER_NAME="Manually " + currentBuild.getBuildCauses()[0].shortDescription