mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 23:14:32 +02:00
Make sure pre-receive hook can properly check Actions token permissions based on your repository configuration
This commit is contained in:
1 parent
efb93b5da1
commit
de0d8da7b6
5 files changed
+42
-23
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user