diff --git a/delete-old-branches b/delete-old-branches index f962026..6659374 100755 --- a/delete-old-branches +++ b/delete-old-branches @@ -44,8 +44,8 @@ is_pr_open_on_branch() { fi local br=${1} - open_prs_branches=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${GITHUB_TOKEN}" \ - "https://api.github.com/repos/${REPO}/pulls" | jq '.[].head.ref' | tr -d '"') + open_prs_branches=$(curl -X GET -s -H "Authorization: token ${GITHUB_TOKEN}" \ + "${BASE_URI}/repos/${REPO}/pulls" | jq '.[].head.ref' | tr -d '"') for pr_br in $open_prs_branches; do if [[ "${pr_br}" == "${br}" ]]; then