From e1a979d81fb74fa6010a5a8ceee9113df634a406 Mon Sep 17 00:00:00 2001
From: Christian Poessinger <christian@poessinger.com>
Date: Tue, 17 Dec 2019 17:07:28 +0100
Subject: Revert "Jenkins: T1870: add 'PR-' prefix to pull request refspec"

This reverts commit de2716ae67a8d88886686fbd7e8db33b6e1a5ebd.
---
 Jenkinsfile | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

(limited to 'Jenkinsfile')

diff --git a/Jenkinsfile b/Jenkinsfile
index 67787f659..d5be6d5c9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -88,16 +88,18 @@ pipeline {
             steps {
                 script {
                     dir('build') {
-                        scm {
-                            git {
-                                remote {
-                                    name(getGitRepoName())
-                                    url(getGitRepoURL())
-                                    refspec('+refs/pull/*:refs/remotes/origin/pr/*')
-                                }
-                                branch('${sha1}')
-                            }
-                        }
+                        checkout([
+                            $class: 'GitSCM',
+                            branches: [[name: getGitBranchName()]],
+                            doGenerateSubmoduleConfigurations: false,
+                            extensions: [[$class: 'CleanCheckout']],
+                            submoduleCfg: [],
+                            userRemoteConfigs: [[
+                                refspec: '+refs/pull/*/head' +
+                                         ':refs/remotes/origin/*',
+                                url: getGitRepoURL()
+                            ]]
+                        ])
                     }
                 }
             }
-- 
cgit v1.2.3