Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !6391

Closed
Created Feb 23, 2014 by Administrator@rootOwner
  • Report abuse
Report abuse

New MR default target branch is default of target.

  • Overview 7
  • Commits 1
  • Changes 5

Created by: cirosantilli

Fixes ACCEPTING MR at http://feedback.gitlab.com/forums/176466-general/suggestions/5518180-smarter-merge-request-target-repo-and-branch-form-

One liner changer + tests ;~

Behavior before this PR: when creating a new MR, the target branch is the first one alphabetically.

Behavior after this PR: when creating a new MR, the target branch is the default of the target repo (which is currently always the current repo).

help me

Works well on interactive tests, but for the unit tests I am unable to change the current branch.

I have tried things like

@project.change_head(branch)

and

click_link("Settings")
select2(branch, from: "Default Branch")
click_button("Save changes")

and many variations without success.

Once this is settled I'll remove the test comments and prints.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/booktree/mr-default-dest-branch