Skip to content

Commit def26e6

Browse files
authoredMar 28, 2022
github-actions-bot: replace 'octokit/request-action' action (#3523)
1 parent f3248cd commit def26e6

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed
 

‎.github/workflows/github-actions-bot.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
outputs:
5858
cmd: ${{ steps.parse-cmd.outputs.cmd }}
5959
replyMessage: ${{ steps.parse-cmd.outputs.replyMessage }}
60-
pullRequestJSON: ${{ steps.get-pull_request-json.outputs.data }}
60+
pullRequestJSON: ${{ steps.parse-cmd.outputs.pullRequestJSON }}
6161
steps:
6262
- uses: actions/github-script@v5
6363
with:
@@ -72,15 +72,11 @@ jobs:
7272
uses: actions/github-script@v5
7373
with:
7474
script: |
75-
const cmd = context.payload.comment.body.replace('@github-actions', '').trim();
76-
core.setOutput('cmd', cmd);
75+
const comment = context.payload.comment.body;
76+
core.setOutput('cmd', comment.replace('@github-actions ', '').trim());
7777
78-
- id: get-pull_request-json
79-
uses: octokit/request-action@v2.x
80-
with:
81-
route: GET ${{ github.event.issue.pull_request.url }}
82-
env:
83-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
const { url } = context.payload.issue.pull_request;
79+
core.setOutput('pullRequestJSON', await github.request(url));
8480
8581
cmd-publish-pr-on-npm:
8682
needs: [accept-cmd]

0 commit comments

Comments
 (0)
Please sign in to comment.