mirror of
https://github.com/markwylde/claude-code-gitea-action.git
synced 2026-02-20 02:22:49 +08:00
Attempt to make this work
This commit is contained in:
@@ -26,7 +26,10 @@ export async function checkHumanActor(
|
||||
|
||||
try {
|
||||
// Fetch user information from GitHub API
|
||||
const response = await api.customRequest("GET", `/api/v1/users/${githubContext.actor}`);
|
||||
const response = await api.customRequest(
|
||||
"GET",
|
||||
`/api/v1/users/${githubContext.actor}`,
|
||||
);
|
||||
const userData = response.data;
|
||||
|
||||
const actorType = userData.type;
|
||||
|
||||
@@ -28,7 +28,10 @@ export async function checkWritePermissions(
|
||||
core.info(`Checking permissions for actor: ${actor}`);
|
||||
|
||||
// Check permissions directly using the permission endpoint
|
||||
const response = await api.customRequest("GET", `/api/v1/repos/${repository.owner}/${repository.repo}/collaborators/${actor}/permission`);
|
||||
const response = await api.customRequest(
|
||||
"GET",
|
||||
`/api/v1/repos/${repository.owner}/${repository.repo}/collaborators/${actor}/permission`,
|
||||
);
|
||||
|
||||
const permissionLevel = response.data.permission;
|
||||
core.info(`Permission level retrieved: ${permissionLevel}`);
|
||||
|
||||
Reference in New Issue
Block a user