Skip to content

Commit

Permalink
log better msg
Browse files Browse the repository at this point in the history
  • Loading branch information
olivercodes committed Jun 9, 2021
1 parent d3a06a0 commit 60da891
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function getApprovers(owners) {
function getUsersOfAlias(ownersAliases, alias) {
if (!ownersAliases.aliases) {
throw new Error('no aliases');
}
} // TODO - return error if alias does not exist
return ownersAliases.aliases[alias];
}

Expand Down Expand Up @@ -10317,7 +10317,7 @@ try {
const actor = github.context.actor;
const isApprover = getUserIsApprover(actor, '.');
if (!isApprover) {
core.setFailed('user is not an approver')
core.setFailed(`${actor} is not an approver. Please check your OWNERS file.`)
} else {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ try {
const actor = github.context.actor;
const isApprover = getUserIsApprover(actor, '.');
if (!isApprover) {
core.setFailed('user is not an approver')
core.setFailed(`${actor} is not an approver. Please check your OWNERS file.`)
} else {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function getApprovers(owners) {
function getUsersOfAlias(ownersAliases, alias) {
if (!ownersAliases.aliases) {
throw new Error('no aliases');
}
} // TODO - return error if alias does not exist
return ownersAliases.aliases[alias];
}

Expand Down

0 comments on commit 60da891

Please sign in to comment.