Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
fix: squash is bool parameter not string
Browse files Browse the repository at this point in the history
  • Loading branch information
GaikwadPratik committed Sep 3, 2023
1 parent da51eb1 commit e464034
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 e464034

Please sign in to comment.