Skip to content

Commit

Permalink
fix: made remove branch on merge the default behaviour for GitLab mer…
Browse files Browse the repository at this point in the history
…ge (#135)

requests
  • Loading branch information
lindell authored Jun 9, 2021
1 parent d2bc434 commit 9cc5983
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/scm/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,14 @@ func (g *Gitlab) CreatePullRequest(ctx context.Context, repo domain.Repository,
}
}

removeSourceBranch := true
mr, _, err := g.glClient.MergeRequests.CreateMergeRequest(r.pid, &gitlab.CreateMergeRequestOptions{
Title: &newPR.Title,
Description: &newPR.Body,
SourceBranch: &newPR.Head,
TargetBranch: &newPR.Base,
AssigneeIDs: assigneeIDs,
Title: &newPR.Title,
Description: &newPR.Body,
SourceBranch: &newPR.Head,
TargetBranch: &newPR.Base,
AssigneeIDs: assigneeIDs,
RemoveSourceBranch: &removeSourceBranch,
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 9cc5983

Please sign in to comment.