File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1616 prDetailsFile=$(Agent.TempDirectory)/prDetails.json
1717 dependabotUser="dependabot[bot]"
1818
19- echo "Pull Request Number: $prNumber"
20-
2119 repoUrl=$(System.PullRequest.SourceRepositoryURI)
20+ # remove .git from repoUrl if present (when raising PRs from vscode, this can happen)
21+ repoUrl="${repoUrl%.git}"
22+
23+ echo "repoUrl: $repoUrl"
24+ echo "prNumber: $prNumber"
2225
2326 # extract org and repo name from repoUrl
2427 orgRepo=$(echo "$repoUrl" | sed -e 's/.*github.com\/\(.*\)/\1/')
2932 # load pull request title from Github API
3033 url="https://api.github.com/repos/$orgRepo/pulls/$prNumber"
3134 curl -s -H "Authorization: token $GITHUB_TOKEN" $url > $prDetailsFile
35+ cat $prDetailsFile
3236 prTitle=$(cat $prDetailsFile | jq -r '.title')
3337 prUser=$(cat $prDetailsFile | jq -r '.user.login')
3438
You can’t perform that action at this time.
0 commit comments