Skip to content

Commit

Permalink
Fix mr create wrong target project
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudingcity committed Mar 18, 2020
1 parent 5839b64 commit b894c3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/gitlab/project/merge_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ func (s *mergeRequestsService) Create() error {

u := *s.baseURL
u.Path = path.Join(s.project, "merge_requests", "new")
q := make(url.Values)
q := u.Query()
q.Set("merge_request[source_branch]", currentBranch)
q.Set("merge_request[target_branch]", defaultBranch)
q.Set("merge_request[source_project_id]", strconv.Itoa(project.ID))
q.Set("merge_request[target_project_id]", strconv.Itoa(project.ID))
u.RawQuery = q.Encode()

fmt.Fprintf(s.out, "\nOpening %s in your browser\n", u.String())
Expand Down

0 comments on commit b894c3f

Please sign in to comment.