Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit 3aac114

Browse files
Update gitlab package
1 parent 1e8b75f commit 3aac114

File tree

8 files changed

+145
-280
lines changed

8 files changed

+145
-280
lines changed

Gopkg.lock

-219
This file was deleted.

Gopkg.toml

-38
This file was deleted.

commands/pipeline/list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func makeListPiplineJobOptions() *gitlab.ListJobsOptions {
8181
return &gitlab.ListJobsOptions{}
8282
}
8383

84-
func pipelineListOutput(pipelines gitlab.PipelineList) []string {
84+
func pipelineListOutput(pipelines []*gitlab.PipelineInfo) []string {
8585
var outputs []string
8686
for _, pipeline := range pipelines {
8787
output := strings.Join([]string{

commands/project_variable.go

+13-4
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ func (c *ProjectVariableCommand) Run(args []string) int {
151151
case ListProjectVariable:
152152
variables, err := client.GetVariables(
153153
pInfo.Project,
154+
makeListProjectVariableOption(),
154155
)
155156
if err != nil {
156157
c.UI.Error(err.Error())
@@ -181,16 +182,24 @@ func validProjectVariableArgs(op ProjectVariableOperation, args []string) error
181182
return nil
182183
}
183184

184-
func makeCreateProjectVariableOption(key, value string) *gitlab.CreateVariableOptions {
185-
opt := &gitlab.CreateVariableOptions{
185+
func makeListProjectVariableOption() *gitlab.ListProjectVariablesOptions {
186+
opt := &gitlab.ListProjectVariablesOptions{
187+
Page: 1,
188+
PerPage: 100,
189+
}
190+
return opt
191+
}
192+
193+
func makeCreateProjectVariableOption(key, value string) *gitlab.CreateProjectVariableOptions {
194+
opt := &gitlab.CreateProjectVariableOptions{
186195
Key: gitlab.String(key),
187196
Value: gitlab.String(value),
188197
}
189198
return opt
190199
}
191200

192-
func makeUpdateProjectVariableOption(key, value string) *gitlab.UpdateVariableOptions {
193-
opt := &gitlab.UpdateVariableOptions{
201+
func makeUpdateProjectVariableOption(key, value string) *gitlab.UpdateProjectVariableOptions {
202+
opt := &gitlab.UpdateProjectVariableOptions{
194203
// Key: gitlab.String(key),
195204
Value: gitlab.String(value),
196205
}

go.mod

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module github.com/lighttiger2505/lab
2+
3+
go 1.12
4+
5+
require (
6+
github.com/armon/go-radix v1.0.0 // indirect
7+
github.com/atotto/clipboard v0.1.2
8+
github.com/fatih/color v1.7.0
9+
github.com/golang/protobuf v1.3.2 // indirect
10+
github.com/google/go-cmp v0.2.0
11+
github.com/jessevdk/go-flags v1.4.0
12+
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
13+
github.com/mattn/go-colorable v0.1.4 // indirect
14+
github.com/mattn/go-isatty v0.0.10 // indirect
15+
github.com/mitchellh/cli v1.0.0
16+
github.com/posener/complete v1.2.1 // indirect
17+
github.com/ryanuber/columnize v0.0.0-20190319233515-9e6335e58db3
18+
github.com/xanzy/go-gitlab v0.21.0
19+
golang.org/x/net v0.0.0-20191101175033-0deb6923b6d9 // indirect
20+
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
21+
golang.org/x/sys v0.0.0-20191029155521-f43be2a4598c // indirect
22+
google.golang.org/appengine v1.6.5 // indirect
23+
gopkg.in/yaml.v2 v2.2.2
24+
)

0 commit comments

Comments
 (0)