From e9a241a9c19438a7fc2eb6ff23ccfdd2af0c3bc6 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Fri, 24 May 2024 17:32:10 +0200 Subject: [PATCH] action.cjs: degeneralize --- action.cjs | 8 ++++++-- src/steps/addAssignees.js | 12 ------------ 2 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 src/steps/addAssignees.js diff --git a/action.cjs b/action.cjs index 7d20a14f..de036b1a 100644 --- a/action.cjs +++ b/action.cjs @@ -95,8 +95,12 @@ module.exports = async ({ github, context, inputs, actionPath, core }) => { // add label step await addLabel({ context, github, label: 'needs-security-review' }) // add assignees step - const { default: addAssignees } = await import(`${actionPath}/src/steps/addAssignees.js`) - await addAssignees({ context, github, assignees: assigneesAfterVal }) + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + assigneesAfterVal + }) } const { default: sendSlackMessage } = await import(`${actionPath}/src/steps/sendSlackMessage.js`) diff --git a/src/steps/addAssignees.js b/src/steps/addAssignees.js deleted file mode 100644 index 12fc318e..00000000 --- a/src/steps/addAssignees.js +++ /dev/null @@ -1,12 +0,0 @@ -export default async function addAssignees ({ - github, - context, - assignees -}) { - return github.rest.issues.addAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - assignees - }) -}