Make sure pre-receive hook can properly check Actions token permissions based on your repository configuration

This commit is contained in:
Excellencedev committed 2025-12-30 05:18:54 +01:00
1 parent efb93b5da1
commit de0d8da7b6
5 files changed
+42 -23

No files matched your search

+2
View File
@@ -187,6 +187,7 @@ Gitea or set your environment appropriately.`, "")
prID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvPRID), 10, 64)
deployKeyID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvDeployKeyID), 10, 64)
actionPerm, _ := strconv.Atoi(os.Getenv(repo_module.EnvActionPerm))
actionsTaskID, _ := strconv.ParseInt(os.Getenv(repo_module.EnvActionsTaskID), 10, 64)
hookOptions := private.HookOptions{
UserID: userID,
@@ -197,6 +198,7 @@ Gitea or set your environment appropriately.`, "")
PullRequestID: prID,
DeployKeyID: deployKeyID,
ActionPerm: actionPerm,
ActionsTaskID: actionsTaskID,
}
scanner := bufio.NewScanner(os.Stdin)