File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 66 steps :
77 - name : Checkout
88 uses : actions/checkout@v1
9+ - name : npm install and build
10+ run : |
11+ npm ci
12+ npm run build
913 - name : Approve Pull Request
1014 uses : ./
1115 with :
Original file line number Diff line number Diff line change 11'use strict'
22
33const core = require ( '@actions/core' )
4- const { GitHub , context } = require ( '@actions/github' )
4+ const github = require ( '@actions/github' )
55
66const main = async ( ) => {
77 const token = core . getInput ( 'github-token' )
@@ -13,12 +13,12 @@ const main = async () => {
1313 const [ owner , repo ] = repoString . split ( '/' )
1414 repoObject = { owner, repo }
1515 } else {
16- repoObject = context . repo
16+ repoObject = github . context . repo
1717 }
1818
19- const octokit = new GitHub ( token )
19+ const octokit = github . getOctokit ( token )
2020
21- await octokit . pulls . createReview ( {
21+ await octokit . rest . pulls . createReview ( {
2222 ...repoObject ,
2323 pull_number : number ,
2424 event : 'APPROVE'
You can’t perform that action at this time.
0 commit comments