diff --git a/dist/index.js b/dist/index.js index d8d9d6d..87e2279 100644 --- a/dist/index.js +++ b/dist/index.js @@ -10314,9 +10314,13 @@ const github = __nccwpck_require__(5438); const {getUserIsApprover} = __nccwpck_require__(5008); try { - const command = core.getInput('command'); const actor = github.context.actor; - return getUserIsApprover(actor, '.'); + const isApprover = getUserIsApprover(actor, '.'); + if (!isApprover) { + core.setFailed('user is not an approver') + } else { + return true; + } } catch (error) { core.setFailed(error.message); } diff --git a/index.js b/index.js index 562bbc2..62b0ee2 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,12 @@ const {getUserIsApprover} = require('./lib/helpers'); try { const actor = github.context.actor; - return getUserIsApprover(actor, '.'); + const isApprover = getUserIsApprover(actor, '.'); + if (!isApprover) { + core.setFailed('user is not an approver') + } else { + return true; + } } catch (error) { core.setFailed(error.message); }