diff --git a/.github/workflows/add-e2e-label.yml b/.github/workflows/add-e2e-label.yml index 96c3517fb0d..cb3a903f791 100644 --- a/.github/workflows/add-e2e-label.yml +++ b/.github/workflows/add-e2e-label.yml @@ -5,14 +5,14 @@ on: types: [opened, synchronize, reopened] jobs: - add-label: + label-pr: runs-on: ubuntu-latest - steps: - - name: Add Run Smoke Label to PR + - name: Apply labels to PR run: | - curl -X POST \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + gh api \ + --method POST \ -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \ - -d '{"labels":["Run Smoke E2E"]}' + /repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \ + -f labels='["Run Smoke E2E"]' +