diff options
author | Stan Hu <stanhu@gmail.com> | 2020-03-26 20:54:04 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2020-03-26 20:54:04 -0700 |
commit | 90fe3a0bd925be0272d92f3ac6f555dd5837cf9e (patch) | |
tree | 80ab6b3e7691066cdde96e725a1f9fb5948715fe /internal/command/uploadarchive | |
parent | f1ec61c73087f08d76bc3f117dc169a30e5a13f6 (diff) | |
download | gitlab-shell-90fe3a0bd925be0272d92f3ac6f555dd5837cf9e.tar.gz |
Add git-archive-pack
Diffstat (limited to 'internal/command/uploadarchive')
-rw-r--r-- | internal/command/uploadarchive/gitalycall.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/command/uploadarchive/gitalycall.go b/internal/command/uploadarchive/gitalycall.go index 269a8e2..e07e6d1 100644 --- a/internal/command/uploadarchive/gitalycall.go +++ b/internal/command/uploadarchive/gitalycall.go @@ -5,6 +5,7 @@ import ( "google.golang.org/grpc" + log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly/client" pb "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" "gitlab.com/gitlab-org/gitlab-shell/internal/command/commandargs" @@ -23,6 +24,16 @@ func (c *Command) performGitalyCall(response *accessverifier.Response) error { request := &pb.SSHUploadArchiveRequest{Repository: &response.Gitaly.Repo} + fields := log.Fields{ + "command": "git-upload-archive", + "glProjectPath": request.Repository.GlProjectPath, + "glRepository": request.Repository.GlRepository, + "userId": response.UserId, + "userName": response.Username, + } + + log.WithFields(fields).Info("executing git command") + return gc.RunGitalyCommand(func(ctx context.Context, conn *grpc.ClientConn) (int32, error) { ctx, cancel := context.WithCancel(ctx) defer cancel() |