Skip to content

Create new branch from issue button

Dev: https://dev.gitlab.org/gitlab/gitlabhq/issues/1160

Requested at http://feedback.gitlab.com/forums/176466-general/suggestions/5163973-create-a-new-branch-from-an-issue Atlassian lists it as a big advantage http://blogs.atlassian.com/2014/04/why-stash/

First step would be to mark the feature request AMR with:

  1. The letter part of the branch name should be limited in length to 25 characters, if it is more round down to the whole words that fit.
  2. This button should be disabled for forks (since their issue numbers are different from the upstream repository).
  3. If you hover over the 'Create branch' button you see the branch name.
  4. If you create the branch the issue gets a comment that links to the branch (for example Started branch 201-issue-branch-button)
  5. If you create a merge request for a branch that starts with a number (for example: 201-) it pre-fills the descriptions with Fixes #201.

Sytse

We could do a maximum of 25 characters after the number and hyphen, see attachment for examples.

Examples: 20-improve-mr-widget-ui 120-seach-the-wiki 1201-deprecate-vmi-s

example1

Working on it on https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/688

People like this: https://twitter.com/tfitch/status/528981012642922496 But when it's all wired together and you're pushing a button in Jira to create a branch. It feels great.

Can someone make a prototype for a new branch button?

Dmitriy

a. We create a branch

step1

b. When branch was created link to branch

step2

c. When MR for such branch was created - we show link to MR instead

step3

Sytse

Awesome! Note that the branch name should be 2390-on-the-issue-dashboard-add-a-way (first the number, than 25 characters rounding down to whole words).

Marin

Won't this be an UI issue when there are multiple participants(eg. whole group) and branch long named 2390-on-the-issue-dashboard-add-a-way? Something will overlap I think. Maybe have the button under the cross project reference on the right side? Branch/MR link is also a reference and there will be enough room for longer named branches without going into participants list area

Sytse

I'm also open to reducing to 20 or 25 characters in total if that helps.

Dmitriy

Sytse keep in mind that we can not use long branch names in UI. the space is limited on smaller screen especially with 10 participants

Maybe have the button under the cross project reference on the right side?

no. overloaded UI

2390-on-the-issue-dashboard-add-a-way

we should not render such huge name. we can use truncation 2390-on-the-issue...

Sytse

2390-on-the-issue... is 21 characters I propose we truncate the generated branch name to last word that fits in 22 characters (including the leading number). So it would be 2390-on-the-issue for this one.

@sytses @dzaporozhets @JobV @marin