Skip to content

Commit

Permalink
Merge pull request #1787 from GaikwadPratik/merge_trains_fix
Browse files Browse the repository at this point in the history
fix: squash is bool parameter not string
  • Loading branch information
svanharmelen committed Sep 3, 2023
2 parents da51eb1 + e464034 commit 0d372da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion merge_trains.go
Expand Up @@ -140,7 +140,7 @@ func (s *MergeTrainsService) GetMergeRequestOnAMergeTrain(pid interface{}, merge
type AddMergeRequestToMergeTrainOptions struct {
WhenPipelineSucceeds *bool `url:"when_pipeline_succeeds,omitempty" json:"when_pipeline_succeeds,omitempty"`
SHA *string `url:"sha,omitempty" json:"sha,omitempty"`
Squash *string `url:"squash,omitempty" json:"squash,omitempty"`
Squash *bool `url:"squash,omitempty" json:"squash,omitempty"`
}

// AddMergeRequestToMergeTrain Add a merge request to the merge train targeting
Expand Down
2 changes: 1 addition & 1 deletion merge_trains_test.go
Expand Up @@ -225,7 +225,7 @@ func TestAddMergeRequestToMergeTrain(t *testing.T) {
mustWriteHTTPResponse(t, w, "testdata/add_merge_request_in_merge_train.json")
})

opt := &AddMergeRequestToMergeTrainOptions{WhenPipelineSucceeds: Bool(true)}
opt := &AddMergeRequestToMergeTrainOptions{WhenPipelineSucceeds: Bool(true), Squash: Bool(true)}

mergeTrains, _, err := client.MergeTrains.AddMergeRequestToMergeTrain(597, 1, opt)
if err != nil {
Expand Down

0 comments on commit 0d372da

Please sign in to comment.