Skip to content

Commit 29ade52

Browse files
authored
Merge pull request #679 from github/lcartey/check-permission-actor
check-permission: Use the current context.actor property
2 parents c7ca9b5 + 2690409 commit 29ade52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/actions/check-permissions/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ runs:
3636
const { data : { permission : actorPermission } } = await github.rest.repos.getCollaboratorPermissionLevel({
3737
owner: context.repo.owner,
3838
repo: context.repo.repo,
39-
username: tools.context.actor
39+
username: context.actor
4040
});
4141
4242
// Confirm whether the actor permission is at least the selected permission
4343
const hasPermission = permissionsRanking.indexOf(minimumPermission) <= permissionsRanking.indexOf(actorPermission) ? "1" : "";
4444
core.setOutput('has-permission', hasPermission);
4545
if (!hasPermission) {
46-
core.info(`Current actor (${tools.context.actor}) does not have the minimum required permission '${minimumPermission}' (has '${actorPermission}')`);
46+
core.info(`Current actor (${context.actor}) does not have the minimum required permission '${minimumPermission}' (has '${actorPermission}')`);
4747
} else {
48-
core.info(`Current actor (${tools.context.actor}) has the minimum required permission '${minimumPermission}' (has '${actorPermission}')`);
48+
core.info(`Current actor (${context.actor}) has the minimum required permission '${minimumPermission}' (has '${actorPermission}')`);
4949
}

0 commit comments

Comments
 (0)