blob: 8a9a78524ab08bf2a83d454eb9eafa994a133153 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package operations
import (
"context"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/internal/rubyserver"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
func (s *server) UserRevert(ctx context.Context, req *gitalypb.UserRevertRequest) (*gitalypb.UserRevertResponse, error) {
if err := validateCherryPickOrRevertRequest(req); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "UserRevert: %v", err)
}
client, err := s.OperationServiceClient(ctx)
if err != nil {
return nil, err
}
clientCtx, err := rubyserver.SetHeaders(ctx, req.GetRepository())
if err != nil {
return nil, err
}
return client.UserRevert(clientCtx, req)
}
|