Browse Source

ci labels PRs with GH title

Michael Kirk 8 months ago
parent
commit
0795fc9118
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Jenkinsfile

+ 6 - 0
Jenkinsfile

@@ -11,6 +11,12 @@ pipeline {
     stages {
         stage('env setup') {
             steps {
+                script {
+                    // CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable
+                    if (env.CHANGE_ID) {
+                        currentBuild.displayName = "PR #${pullRequest.number}: ${pullRequest.title}"
+                    }
+                }
                 sh 'make setup'
             }
         }