@@ -14,21 +14,14 @@ async function getActionParameters() {
1414 console . log ( `Getting PR from issue` ) ;
1515 const {
1616 issue : { number : issueNumber } ,
17+ comment,
1718 repository : {
1819 owner : { login : owner } ,
1920 name : repo ,
2021 } ,
2122 } = github . context . payload ;
2223 console . log ( `Found issue ${ issueNumber } for ${ owner } /${ repo } ` ) ;
23- const pullRequest = (
24- await octokit . pulls . get ( {
25- owner,
26- repo,
27- pull_number : issueNumber ,
28- } )
29- ) . data ;
30- console . log ( "Got pull request" , pullRequest ) ;
31- return { pullRequest, owner, repo, issueNumber } ;
24+ return { comment, owner, repo, issueNumber } ;
3225 } else {
3326 // this is a PR event
3427 console . log ( "Getting PR from context" ) ;
@@ -98,9 +91,12 @@ exports.action = async function action() {
9891
9992async function actionIssue ( ) {
10093 console . info ( `Calling action on issue` ) ;
101- console . log ( github . context ) ;
102- return ;
103- const { owner, repo, issueNumber, pullRequest } = await getActionParameters ( ) ;
94+ const { owner, repo, issueNumber, comment } = await getActionParameters ( ) ;
95+
96+ if ( ! getHasRequestedReview ( [ comment ] ) ) {
97+ console . log ( "This comment is not a message requesting review, ignoring" ) ;
98+ return ;
99+ }
104100
105101 const workflowRuns = await octokit . paginate (
106102 "GET /repos/{owner}/{repo}/actions/runs" ,
0 commit comments