From 2a6317d4932356a70ab3f6701843abf783e3f8f1 Mon Sep 17 00:00:00 2001 From: Aleksei Lymar Date: Wed, 15 Apr 2020 13:56:34 +0300 Subject: [PATCH] fix: get correct change author's email for a PR even after merging with a base branch --- Jenkinsfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 026560047e..77008172f4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,11 +8,6 @@ node('cuda-module') { checkout scm } stage('Setup') { - GIT_COMMIT_EMAIL = sh ( - script: "git --no-pager show -s --format='%ae'", - returnStdout: true - ).trim() - env.TFHUB_CACHE_DIR="tfhub_cache" sh """ virtualenv --python=python3.7 '.venv-$BUILD_NUMBER' @@ -44,7 +39,7 @@ node('cuda-module') { throw e } finally { - emailext to: "\${DEFAULT_RECIPIENTS}, ${GIT_COMMIT_EMAIL}", + emailext to: "\${DEFAULT_RECIPIENTS}, ${CHANGE_AUTHOR_EMAIL}", subject: "${env.JOB_NAME} - Build # ${currentBuild.number} - ${currentBuild.result}!", body: '${BRANCH_NAME} - ${BUILD_URL}', attachLog: true