Skip to content

Commit 1c88ade

Browse files
committed
update BitbucketTrigerPipelineRequestBody
1 parent 48af926 commit 1c88ade

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pipelines.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package bitbucket
33
import (
44
"encoding/json"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"net/url"
88
)
99

@@ -107,7 +107,7 @@ func (p *Pipelines) GetLog(po *PipelinesOptions) (string, error) {
107107
}
108108
defer responseBody.Close()
109109

110-
rawBody, err := ioutil.ReadAll(responseBody)
110+
rawBody, err := io.ReadAll(responseBody)
111111
if err != nil {
112112
return "", err
113113
}
@@ -125,7 +125,11 @@ type BitbucketTrigerPipelineRequestBody struct {
125125
Pattern string `json:"pattern"`
126126
} `json:"selector"`
127127
} `json:"target"`
128-
Variables string `json:"variables"`
128+
Variables []struct {
129+
Key string `json:"key"`
130+
Value string `json:"value"`
131+
Secured bool `json:"secured,omitempty"`
132+
} `json:"variables"`
129133
}
130134

131135
func (p *Pipelines) TriggerPipeline(po *PipelinesOptions, body *BitbucketTrigerPipelineRequestBody) (interface{}, error) {

0 commit comments

Comments
 (0)