diff --git a/.github/workflows/default_slash_ops_command_ready_callable.yml b/.github/workflows/default_slash_ops_command_ready_callable.yml index 21c2653..15399d5 100644 --- a/.github/workflows/default_slash_ops_command_ready_callable.yml +++ b/.github/workflows/default_slash_ops_command_ready_callable.yml @@ -24,7 +24,12 @@ jobs: with: script: | // get the PR text and make sure that all items are checked - const prText = context.payload.pull_request.body; + const pr = await github.rest.pulls.get({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.client_payload.pull_request.number, + }); + const prText = pr.data.body; prText.split('\n').forEach(line => { if (line.startsWith('- [ ]')) { @@ -39,10 +44,10 @@ jobs: replace(//g, ''); // update the PR text - github.rest.pulls.update({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, + await github.rest.pulls.update({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.client_payload.pull_request.number, body: cleanPrText, });