Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/git/hooks_options.go')
-rw-r--r--internal/git/hooks_options.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/git/hooks_options.go b/internal/git/hooks_options.go
index f980b7d27..fa205e782 100644
--- a/internal/git/hooks_options.go
+++ b/internal/git/hooks_options.go
@@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
+ "strconv"
"gitlab.com/gitlab-org/gitaly/internal/git/hooks"
"gitlab.com/gitlab-org/gitaly/internal/gitaly/config"
@@ -79,8 +80,12 @@ type ReceivePackRequest interface {
// git-receive-pack(1).
func WithReceivePackHooks(ctx context.Context, cfg config.Cfg, req ReceivePackRequest, protocol string) CmdOpt {
return func(cc *cmdCfg) error {
+ userId, err := strconv.ParseInt(req.GetGlId(), 10, 0)
+ if err != nil {
+ return err
+ }
if err := cc.configureHooks(ctx, req.GetRepository(), config.Config, &ReceiveHooksPayload{
- UserID: req.GetGlId(),
+ UserID: userId,
Username: req.GetGlUsername(),
Protocol: protocol,
}); err != nil {