Skip to content

Commit 53ff946

Browse files
committed
changeRequest is not working reliably in groovy, replaced with env check
1 parent 1d9743e commit 53ff946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void runSonarScanner() {
150150
def changeUrl = env.GIT_URL.split("/")
151151
def org = changeUrl[3]
152152
def repo = changeUrl[4].substring(0, changeUrl[4].length() - 4)
153-
if (changeRequest()) {
153+
if (env.CHANGE_ID != null) {
154154
sh "mvn -B sonar:sonar \
155155
-Dsonar.projectKey=${org}_${repo} \
156156
-Dsonar.pullrequest.provider=GitHub \

0 commit comments

Comments
 (0)