File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11'use strict'
22
3- const core = require ( '@actions/core' )
4- const { getOctokit , context } = require ( '@actions/github' )
3+ const core = require ( '@actions/core' ) ;
4+ const github = require ( '@actions/github' ) ;
55
66const main = async ( ) => {
77 const token = core . getInput ( 'github-token' , {
@@ -26,7 +26,8 @@ const main = async () => {
2626 required : false
2727 } ) ; // merge|squash|rebase|fast-forward
2828
29- const octokit = getOctokit ( token ) ;
29+ const octokit = github . getOctokit ( token ) ;
30+ const context = github . context ;
3031
3132 if ( ! context . actor . match ( allowed_usernames ) ) {
3233 core . warning ( 'Ignored, the username does not match.' ) ;
@@ -35,7 +36,7 @@ const main = async () => {
3536 core . info ( 'Username matched.' ) ;
3637 }
3738
38- const pullRequest = await octokit . pulls . get ( {
39+ const pullRequest = await octokit . rest . pulls . get ( {
3940 ...context . repo ,
4041 ...context . owner ,
4142 pull_number : number
You can’t perform that action at this time.
0 commit comments