From 5a5ee034eff88bee239d4f49cd041fed0bec7480 Mon Sep 17 00:00:00 2001 From: Kareem Morsy Date: Thu, 22 Jun 2023 19:38:18 +0300 Subject: [PATCH] Add issue_comment --- dist/index.js | 6 ++++++ index.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dist/index.js b/dist/index.js index ea3e526..0d2c883 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13121,6 +13121,12 @@ async function getCommits() { commits = await gh.paginate(`GET ${url}`, args); break; + case 'issue_comment': + const pr_url = context.payload.issue.pull_request.url; + + commits = await gh.paginate(`GET ${pr_url}/commits`, args); + break; + default: info('You are using this action on an event for which it has not been tested. Only the "push", "pull_request" and "pull_request_target" events are officially supported.'); diff --git a/index.js b/index.js index a99a7dd..dab2859 100644 --- a/index.js +++ b/index.js @@ -50,6 +50,12 @@ async function getCommits() { commits = await gh.paginate(`GET ${url}`, args); break; + case 'issue_comment': + const pr_url = context.payload.issue.pull_request.url; + + commits = await gh.paginate(`GET ${pr_url}/commits`, args); + break; + default: info('You are using this action on an event for which it has not been tested. Only the "push", "pull_request" and "pull_request_target" events are officially supported.');