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.
This commit is contained in:
Vendored
+6
-1
@@ -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')]) {
|
||||
|
||||
Reference in New Issue
Block a user