diff --git a/.github/workflows/ops-slash-command-hold.yml b/.github/workflows/ops-slash-command-hold.yml index bc433ac3d..5978a63a4 100644 --- a/.github/workflows/ops-slash-command-hold.yml +++ b/.github/workflows/ops-slash-command-hold.yml @@ -10,16 +10,12 @@ jobs: permissions: pull-requests: write steps: - - name: Dump the client payload context - env: - PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }} - run: echo "$PAYLOAD_CONTEXT" - uses: actions/github-script@v8 with: script: | github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: ['pr-reviews/hold'] + owner: '${{ github.event.client_payload.github.payload.repository.owner.login }}', + repo: '${{ github.event.client_payload.github.payload.repository.name }}', + issue_number: ${{ github.event.client_payload.github.pull_request.number }}, + labels: ['pr-review/hold'] }) diff --git a/.github/workflows/ops-slash-command-unhold.yml b/.github/workflows/ops-slash-command-unhold.yml index 408213067..c96a2513e 100644 --- a/.github/workflows/ops-slash-command-unhold.yml +++ b/.github/workflows/ops-slash-command-unhold.yml @@ -14,8 +14,8 @@ jobs: with: script: | github.rest.issues.removeLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - name: 'pr-reviews/hold' + owner: '${{ github.event.client_payload.github.payload.repository.owner.login }}', + repo: '${{ github.event.client_payload.github.payload.repository.name }}', + issue_number: ${{ github.event.client_payload.github.pull_request.number }}, + name: 'pr-review/hold' })