summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xanzy/go-gitlab/pipelines.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/pipelines.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/pipelines.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/pipelines.go b/vendor/github.com/xanzy/go-gitlab/pipelines.go
index 4d2bd770eb..aedcefd6c4 100644
--- a/vendor/github.com/xanzy/go-gitlab/pipelines.go
+++ b/vendor/github.com/xanzy/go-gitlab/pipelines.go
@@ -1,5 +1,5 @@
//
-// Copyright 2017, Igor Varavko
+// Copyright 2021, Igor Varavko
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package gitlab
import (
"fmt"
+ "net/http"
"time"
)
@@ -170,7 +171,7 @@ func (s *PipelinesService) ListProjectPipelines(pid interface{}, opt *ListProjec
}
u := fmt.Sprintf("projects/%s/pipelines", pathEscape(project))
- req, err := s.client.NewRequest("GET", u, opt, options)
+ req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -194,7 +195,7 @@ func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options ..
}
u := fmt.Sprintf("projects/%s/pipelines/%d", pathEscape(project), pipeline)
- req, err := s.client.NewRequest("GET", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -218,7 +219,7 @@ func (s *PipelinesService) GetPipelineVariables(pid interface{}, pipeline int, o
}
u := fmt.Sprintf("projects/%s/pipelines/%d/variables", pathEscape(project), pipeline)
- req, err := s.client.NewRequest("GET", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -242,7 +243,7 @@ func (s *PipelinesService) GetPipelineTestReport(pid interface{}, pipeline int)
}
u := fmt.Sprintf("projects/%s/pipelines/%d/test_report", pathEscape(project), pipeline)
- req, err := s.client.NewRequest("GET", u, nil, nil)
+ req, err := s.client.NewRequest(http.MethodGet, u, nil, nil)
if err != nil {
return nil, nil, err
}
@@ -274,7 +275,7 @@ func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOp
}
u := fmt.Sprintf("projects/%s/pipeline", pathEscape(project))
- req, err := s.client.NewRequest("POST", u, opt, options)
+ req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -299,7 +300,7 @@ func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipeline int, opt
}
u := fmt.Sprintf("projects/%s/pipelines/%d/retry", pathEscape(project), pipeline)
- req, err := s.client.NewRequest("POST", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -324,7 +325,7 @@ func (s *PipelinesService) CancelPipelineBuild(pid interface{}, pipeline int, op
}
u := fmt.Sprintf("projects/%s/pipelines/%d/cancel", pathEscape(project), pipeline)
- req, err := s.client.NewRequest("POST", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -349,7 +350,7 @@ func (s *PipelinesService) DeletePipeline(pid interface{}, pipeline int, options
}
u := fmt.Sprintf("projects/%s/pipelines/%d", pathEscape(project), pipeline)
- req, err := s.client.NewRequest("DELETE", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodDelete, u, nil, options)
if err != nil {
return nil, err
}