fix: use GitHub API directly instead of gh CLI

The gh CLI is not installed on the runners. Use curl and the GitHub API
directly to set PR labels.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-11 12:43:13 +00:00
committed by Hugh Hackman [agent]
parent e9864e77e0
commit 487058ed5e
+11 -2
View File
@@ -68,6 +68,15 @@ jobs:
- name: Set PR label
if: github.event_name == 'pull_request'
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PIPELINE_TYPE: ${{ steps.detect.outputs.pipeline-type }}
run: |
gh pr edit "${{ github.event.pull_request.number }}" \
--add-label "${{ steps.detect.outputs.pipeline-type }}"
curl -sf \
-X POST \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${REPO}/issues/${PR_NUMBER}/labels" \
-d "{\"labels\":[\"${PIPELINE_TYPE}\"]}"