From c49875fc37568a9cb6c7af52e1deb7b5fbcccc7f Mon Sep 17 00:00:00 2001 From: ibtehajn <81370835+ibtehajn@users.noreply.github.com> Date: Wed, 12 May 2021 11:08:23 +0100 Subject: [PATCH] Use author instead of committer in changelog computations Any commits created through the GitHub UI (e.g. commits created by merging PRs) usually assign GitHub itself as the ccommitter. This is expected behaviour, as the commit is applied by GitHub itself. However, for the purposes of changelog creation, showing the author (e.g. the person who clicked the merge button on the PR) is more useful. --- scripts/build/Jenkins/Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index ae2779eba8..ad01d6ed05 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -190,6 +190,7 @@ def CheckoutBootstrapScripts(String branchName) { doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'PruneStaleBranch'], + [$class: 'AuthorInChangelog'], [$class: 'SparseCheckoutPaths', sparseCheckoutPaths: [ [ $class: 'SparseCheckoutPath', path: 'scripts/build/Jenkins/' ], [ $class: 'SparseCheckoutPath', path: 'scripts/build/bootstrap/' ], @@ -234,6 +235,7 @@ def CheckoutRepo(boolean disableSubmodules = false) { branches: scm.branches, extensions: [ [$class: 'PruneStaleBranch'], + [$class: 'AuthorInChangelog'], [$class: 'SubmoduleOption', disableSubmodules: disableSubmodules, recursiveSubmodules: true], [$class: 'CheckoutOption', timeout: 60] ], @@ -339,7 +341,10 @@ def TestMetrics(Map pipelineConfig, String workspace, String branchName, String checkout scm: [ $class: 'GitSCM', branches: [[name: '*/main']], - extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'mars']], + extensions: [ + [$class: 'AuthorInChangelog'], + [$class: 'RelativeTargetDirectory', relativeTargetDir: 'mars'] + ], userRemoteConfigs: [[url: "${env.MARS_REPO}", name: 'mars', credentialsId: "${env.GITHUB_USER}"]] ] withCredentials([usernamePassword(credentialsId: "${env.SERVICE_USER}", passwordVariable: 'apitoken', usernameVariable: 'username')]) {