Skip to content

Commit

Permalink
update to fail if no owner
Browse files Browse the repository at this point in the history
  • Loading branch information
olivercodes committed Jun 9, 2021
1 parent 37d6cf6 commit d3a06a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit d3a06a0

Please sign in to comment.