File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,12 +41,16 @@ jobs:
4141 printf 'Applying label %s\n' "${label}"
4242 # we use curl rather than octokit/request-action so that the job won't fail
4343 # (and send an annoying email) if the labels don't exist
44+ url="https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels"
45+ printf 'url: %s\n' "${url}"
46+ jsonLabel="$(printf '{"labels":["%s"]}' "${label}")"
47+ printf 'jsonLabel: %s\n' "${jsonLabel}"
4448 curl --request POST \
4549 --header 'Accept: application/vnd.github+json' \
4650 --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
4751 --header 'X-GitHub-Api-Version: 2022-11-28' \
48- --url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
49- --data "{'labels':[${label}] }"
52+ --url "${url}" \
53+ --data "${jsonLabel }"
5054 else
5155 echo "There is no single label that we could apply, so we are not applying any label."
5256 fi
You can’t perform that action at this time.
0 commit comments