Skip to content

Commit 9070507

Browse files
committed
Trying to improve determination of branch name in CI
1 parent 004d131 commit 9070507

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,8 @@ def resolveBranchName(String featureBranchPRMinusNo, String orgName, String repo
625625

626626
// curl the repo based on the feature branch no to get the branch information
627627
/// Note: only works for public repos! Otherwise credentials needs to be passed
628-
def curlUrl = "curl https://api.github.com/repos/" + orgName + "/" + repoName + "/pulls/" + prNo
629-
def response = curlUrl.execute().text
628+
def curlUrl = "set +x && curl -s https://api.github.com/repos/" + orgName + "/" + repoName + "/pulls/" + prId
629+
String response = sh(script: curlUrl, returnStdout: true)
630630
def matcher = response =~ /\"label\":\s\"(.+)\"/
631631

632632
assert matcher.find()

0 commit comments

Comments
 (0)