Commit Graph

25 Commits

Author SHA1 Message Date
Sean McGivern b2f60bb9a1 Fix auto-MR-close text from branch name
Rails's form helpers use the `$attr_before_type_cast` method where
available, and this value only appears to be updated on assignment, not
when the object is mutated in some other way:

    [1] pry(main)> mr = MergeRequest.new
    => #<MergeRequest:0x007fcf28395d88 ...>
    [2] pry(main)> mr.description = 'foo'
    => "foo"
    [3] pry(main)> mr.description << ' bar'
    => "foo bar"
    [4] pry(main)> mr.description
    => "foo bar"
    [5] pry(main)> mr.description_before_type_cast
    => "foo"
    [6] pry(main)> mr.description += ' bar'
    => "foo bar bar"
    [7] pry(main)> mr.description_before_type_cast
    => "foo bar bar"
2016-06-21 17:59:20 +01:00
Gabriel Mazetto f5a0ac0fc1 Codestyle: make sure we have space around operators 2016-05-13 04:46:56 -03:00
Sean McGivern 09209725ce Don't auto-set MR title for confidential issues 2016-05-06 12:24:37 +01:00
Sean McGivern e76f339dcd Auto-set title for branches created from issues
If a branch starts with an issue's IID, followed by a hyphen, the
description will be updated to say that is closes the issue. This also
updates the title of the merge request to 'Resolves "$issue-title"', as
long as:
- There is more than one commit in the merge request (if there is only
  one commit, the commit's title will be used as before)
- The issue's IID is valid for the project
2016-05-06 12:24:37 +01:00
Rémy Coutable cd0750e045 Prevent private project name and namespace from leaking in the new MR view
Fixes #15591.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-25 15:32:44 -04:00
Zeger-Jan van de Weg 0385cd5a58 Start with iid on branch creation 2016-04-14 14:49:45 +02:00
Zeger-Jan van de Weg 70ca3370eb \#to_branch_name now uses the iid as postfix
Given the branch name 'mep-mep' with an iid being 1,
the current way, master's way, would yield a branch name of
1-mep-mep. The problem for larger projects however would be that
a developer might forget what iid the issue was.

When this developer would try to tab complete it would:
- Or result in 20+ branches possibly
- Or start with the wrong digit, try again with digit++
  - Would see 20 branches, repeat

Thus the obvious way of solving this is letting the dev tab complete
on the issue title, which is easier to remember.
2016-03-18 19:34:04 +01:00
Zeger-Jan van de Weg ad97bebfed Enhance new branch button on an issue 2016-03-15 20:21:11 +01:00
Zeger-Jan van de Weg 228007dfbc new-branch-button 2016-03-15 20:21:11 +01:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Rubén Dávila 5bb5019e04 Use adequate description for new MR. 2016-02-19 13:14:49 -05:00
Dmitriy Zaporozhets 3e259ea8bc Revert "Merge branch 'revert-satellites' into 'master' "
This reverts commit 5daf44b7c8, reversing
changes made to 2f706fbd23.
2015-08-11 14:33:31 +02:00
Dmitriy Zaporozhets 9f10943c1a
Revert "Merge branch 'drop-satellites'"
This reverts commit 957e849f41, reversing
changes made to 6b9dbe9f5a.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-11 10:28:42 +02:00
Dmitriy Zaporozhets ab8c71de4e
Fix merge request creation without branch selected
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-05 11:03:41 +02:00
Dmitriy Zaporozhets 26f5d6047d Refactor compare and fetch logic 2015-07-15 17:28:09 +02:00
Dmitriy Zaporozhets a87989fb7d Remove satellites 2015-07-15 15:45:57 +02:00
Douwe Maan 84a1590252 Let commit model know about its project. 2015-04-24 12:29:36 +02:00
Douwe Maan 2f76ccdfac Base new MR description on commit description if there's only one. 2015-02-20 22:17:38 +01:00
Douwe Maan 8830cfaa60 Base new MR title on commit title if there's only one. 2015-02-20 15:06:06 +01:00
Drew Blessing aacf07467c Merge request error display.
Fixes #8432
2014-12-26 15:54:12 -06:00
Dmitriy Zaporozhets bf9ce1f4cf
Refactor compare logic for MR. Use satellites only for forks for better performance
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-29 12:11:16 +03:00
Dmitriy Zaporozhets ddaa493ef3
Improve MR building
* fix 500 error when no parent for initial commit
* fix link from diff files to wrong commit

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-28 20:54:40 +03:00
Dmitriy Zaporozhets 9879c427ce
If MR commits are empty if does not mean compare failed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-15 23:04:14 +03:00
Dmitriy Zaporozhets be5b6db883
Refactor diff suppress logic and diff views
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-15 18:28:21 +03:00
Dmitriy Zaporozhets 45623089e2
Refactor MR build process
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-15 15:34:06 +03:00