summaryrefslogtreecommitdiffstats
path: root/cmd/hook.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/hook.go')
-rw-r--r--cmd/hook.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/hook.go b/cmd/hook.go
index b3e900afee..ca876f02a3 100644
--- a/cmd/hook.go
+++ b/cmd/hook.go
@@ -65,6 +65,7 @@ func runHookPreReceive(c *cli.Context) error {
username := os.Getenv(models.EnvRepoUsername)
reponame := os.Getenv(models.EnvRepoName)
userID, _ := strconv.ParseInt(os.Getenv(models.EnvPusherID), 10, 64)
+ prID, _ := strconv.ParseInt(os.Getenv(models.ProtectedBranchPRID), 10, 64)
buf := bytes.NewBuffer(nil)
scanner := bufio.NewScanner(os.Stdin)
@@ -95,6 +96,7 @@ func runHookPreReceive(c *cli.Context) error {
UserID: userID,
GitAlternativeObjectDirectories: os.Getenv(private.GitAlternativeObjectDirectories),
GitObjectDirectory: os.Getenv(private.GitObjectDirectory),
+ ProtectedBranchID: prID,
})
switch statusCode {
case http.StatusInternalServerError: