Skip to content

Commit 3b55875

Browse files
author
Oleg Sucharevich
authored
Merge pull request #7 from pchico83/list-labels
Add "qs" parameter to pipeline list method
2 parents fc18af8 + f971348 commit 3b55875

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.19.1
1+
0.19.2

cmd/get_pipeline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var getPipelineCmd = &cobra.Command{
3939
table := internal.CreateTable()
4040
table.SetHeader([]string{"Pipeline Name", "Created At", "Updated At"})
4141
table.Append([]string{"", "", ""})
42-
pipelines, err := codefreshClient.Pipelines().List()
42+
pipelines, err := codefreshClient.Pipelines().List(nil)
4343
internal.DieOnError(err)
4444
for _, p := range pipelines {
4545
table.Append([]string{

pkg/codefresh/pipeline.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
type (
1111
// IPipelineAPI declers Codefresh pipeline API
1212
IPipelineAPI interface {
13-
List() ([]*Pipeline, error)
13+
List(qs map[string]string) ([]*Pipeline, error)
1414
Run(string, *RunOptions) (string, error)
1515
}
1616

@@ -75,11 +75,12 @@ func newPipelineAPI(codefresh Codefresh) IPipelineAPI {
7575
}
7676

7777
// Get - returns pipelines from API
78-
func (p *pipeline) List() ([]*Pipeline, error) {
78+
func (p *pipeline) List(qs map[string]string) ([]*Pipeline, error) {
7979
r := &getPipelineResponse{}
8080
resp, err := p.codefresh.requestAPI(&requestOptions{
8181
path: "/api/pipelines",
8282
method: "GET",
83+
qs: qs,
8384
})
8485
err = p.codefresh.decodeResponseInto(resp, r)
8586
return r.Docs, err

0 commit comments

Comments
 (0)