Skip to content

Commit

Permalink
update BitbucketTrigerPipelineRequestBody
Browse files Browse the repository at this point in the history
  • Loading branch information
veziak committed Mar 23, 2023
1 parent 48af926 commit 1c88ade
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bitbucket
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/url"
)

Expand Down Expand Up @@ -107,7 +107,7 @@ func (p *Pipelines) GetLog(po *PipelinesOptions) (string, error) {
}
defer responseBody.Close()

rawBody, err := ioutil.ReadAll(responseBody)
rawBody, err := io.ReadAll(responseBody)
if err != nil {
return "", err
}
Expand All @@ -125,7 +125,11 @@ type BitbucketTrigerPipelineRequestBody struct {
Pattern string `json:"pattern"`
} `json:"selector"`
} `json:"target"`
Variables string `json:"variables"`
Variables []struct {
Key string `json:"key"`
Value string `json:"value"`
Secured bool `json:"secured,omitempty"`
} `json:"variables"`
}

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

0 comments on commit 1c88ade

Please sign in to comment.