diff options
author | 2019-05-12 16:01:12 -0700 | |
---|---|---|
committer | 2019-05-12 16:01:12 -0700 | |
commit | 27af05b05b5c5bc0974ed61bf75f93a3b42280df (patch) | |
tree | 755ea947be7ae0e3f0d5d0fb87a2565063d12c18 | |
parent | Retrieve previous build's commit using a REST API (diff) |
Ensure branches are prefixed with refs/heads/
-rw-r--r-- | azure-pipelines.yml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 883f554..3df683b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -43,6 +43,9 @@ jobs: command: 'login' - script: | + SYSTEM_PULLREQUEST_TARGETBRANCH=refs/heads/"${SYSTEM_PULLREQUEST_TARGETBRANCH#refs/heads/}" + BUILD_SOURCEBRANCH=refs/heads/"${BUILD_SOURCEBRANCH#refs/heads/}" + REQUEST_URL="https://dev.azure.com/python-discord/${SYSTEM_TEAMPROJECTID}/_apis/build/builds?queryOrder=finishTimeDescending&resultFilter=succeeded&\$top=1&repositoryType=${BUILD_REPOSITORY_PROVIDER}&repositoryId=${BUILD_REPOSITORY_NAME}&branchName=${SYSTEM_PULLREQUEST_TARGETBRANCH:-BUILD_SOURCEBRANCH}&api-version=5.0" echo "Retrieving previous build's commit using $REQUEST_URL" |