summaryrefslogtreecommitdiff
path: root/internal/gitlabnet/accessverifier/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/gitlabnet/accessverifier/client.go')
-rw-r--r--internal/gitlabnet/accessverifier/client.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/gitlabnet/accessverifier/client.go b/internal/gitlabnet/accessverifier/client.go
index 00b9d76..7e120e0 100644
--- a/internal/gitlabnet/accessverifier/client.go
+++ b/internal/gitlabnet/accessverifier/client.go
@@ -1,6 +1,7 @@
package accessverifier
import (
+ "context"
"fmt"
"net/http"
@@ -77,7 +78,7 @@ func NewClient(config *config.Config) (*Client, error) {
return &Client{client: client}, nil
}
-func (c *Client) Verify(args *commandargs.Shell, action commandargs.CommandType, repo string) (*Response, error) {
+func (c *Client) Verify(ctx context.Context, args *commandargs.Shell, action commandargs.CommandType, repo string) (*Response, error) {
request := &Request{Action: action, Repo: repo, Protocol: protocol, Changes: anyChanges}
if args.GitlabUsername != "" {
@@ -88,7 +89,7 @@ func (c *Client) Verify(args *commandargs.Shell, action commandargs.CommandType,
request.CheckIp = sshenv.LocalAddr()
- response, err := c.client.Post("/allowed", request)
+ response, err := c.client.Post(ctx, "/allowed", request)
if err != nil {
return nil, err
}