Commit Graph

90 Commits

Author SHA1 Message Date
Shinya Maeda d4b4693663 Abstract auto merge processes
We have one auto merge strategy today - Merge When Pipeline
Succeeds.

In order to add more strategies for Merge Train feature,
we abstract the architecture to be more extensible.

Removed arguments

Fix spec
2019-06-03 13:15:29 +07:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Douwe Maan e0054a9ab1 Revert "Merge branch 'blackst0ne-update-push-new-merge-request-url' into 'master'"
This reverts merge request !22526
2018-11-07 13:32:20 +00:00
blackst0ne e40f8f27a1 Update other links 2018-10-26 11:09:48 +11:00
Jacopo e2056f08f0 Hides Close MR button on merged MR
When a Merge request is merged, shows only the Report abuse menu item
in the dropdown menu instead of showing the close_reopen_report toggle
with an unusable Close button.
The Report abuse is still hidden when the author of the Merge request
is the current_user.

Hides the Reopen button on a closed and locked issue when the
issue.author is not the current_user
2018-10-02 16:17:55 +02:00
gfyoung 1993a4449a Enable frozen string for app/helpers/**/*.rb
Partially addresses #47424.
2018-09-06 17:33:46 -07:00
Tim Zallmann fb44cb3d90 Performance Improvements to Vue MR page 2018-06-30 13:17:46 +00:00
Felipe Artur 3e66795ef1 Changes tab VUE refactoring 2018-06-21 12:22:40 +00:00
Mark Chao 0d44f4d50e Rephrase "maintainer" to more precise "members who can merge to the target branch"
"Maintainer" will be freed to be used for #42751
2018-06-01 14:33:12 +09:00
blackst0ne 4cff66a6c4 Add 'squash and rebase' feature to CE 2018-05-29 20:51:43 +11:00
Bob Van Landuyt fe9389ba6c Hide new mr from dropdown for archived projects 2018-04-11 10:51:15 +02:00
Bob Van Landuyt 792ab0631c Allow a user to select `allow maintainer to push`
When a project is not private, and the source branch not protected the
user can now select the option to allow maintainers to push to this
branch
2018-03-07 15:12:31 +01:00
micael.bergeron 360b94ceba adding view and feature specs 2017-12-07 09:06:59 -05:00
micael.bergeron 142edf0afc diff notes created in merge request on a commit have the right context
add a spec for commit merge request diff notes
2017-12-07 09:01:23 -05:00
Bob Van Landuyt 70716a1292 Allow creating merge requests across forks of a project 2017-10-07 11:46:23 +02:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Douwe Maan 70b05a8377 Split up MergeRequestsController 2017-06-28 18:17:44 -05:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Fatih Acet 0151325dac Merge request widget redesign 2017-05-09 04:15:34 +00:00
mhasbini ccac05dd90 Fix 404 when upstream has disabled merge requests 2017-04-27 01:04:07 +03:00
Jeff Stubler a78eeefd6e Change issues sentence to use natural sorting 2017-04-25 18:57:08 -05:00
James Lopez a0101ebf84 Update occurrences of MWBS to MWPS
Rename column in the database
 Rename fields related to import/export feature
 Rename API endpoints
 Rename documentation links
 Rename the rest of occurrences in the code
 Replace the images that contain the words "build succeeds" and docs referencing to them
 Make sure pipeline is green and nothing is missing.

updated doc images

renamed only_allow_merge_if_build_succeeds in projects and fixed references

more updates

fix some spec failures

fix rubocop offences

fix v3 api spec

fix MR  specs

fixed issues with partials

fix MR spec

fix alignment

add missing v3 to v4 doc

wip - refactor v3 endpoints

fix specs

fix a few typos

fix project specs

copy entities fully to V3

fix  entity error

more fixes

fix failing specs

fixed missing entities in V3 API

remove comment

updated code based on feedback

typo

fix spec
2017-03-01 12:02:02 +01:00
Dongqing Hu 6b64a2ca3d Don't ignore the parameter of MergeRequestsHelper#mr_change_branches_path 2017-02-14 21:43:12 +08:00
Sean McGivern 40704daad8 Merge branch 'restore-issues_mentioned_but_not_closing' into 'master'
pass in current_user in MergeRequest and MergeRequestsHelper

See merge request !8624
2017-02-08 12:35:04 +00:00
Jarka Kadlecova 831b9335ba Fix MR widget url 2017-02-07 07:54:59 +01:00
Sean McGivern 7550f60dde Backport changes from EE squash
Backport changes from the EE-only squash implementation, which would
otherwise conflict when merge CE into EE.

<https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1024>
2017-02-03 09:46:03 +00:00
Dongqing Hu da81add825 should pass in current_user from MergeRequestsHelper 2017-01-19 14:23:58 +08:00
Jarka Kadlecova 557a0bf14c Address MR comments 2017-01-13 09:16:35 -05:00
Gabriel Gizotti c1515cd865 better mentioned but not closing message and icon 2016-12-16 19:13:17 +10:00
Gabriel Gizotti 80915c35f4 diplays mentioned but not merged message on MR show page 2016-12-16 19:13:17 +10:00
Nick Thomas 374071321d Fix the merge request view when source projects or branches are removed 2016-10-20 12:24:27 +01:00
Dmitriy Zaporozhets 3dd7ad5064
Improve mr compare message when base is different
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-12 17:42:32 +03:00
James 492b4332a4 Added link to bulk assign issues to MR author. (Issue #18876) 2016-10-06 13:37:37 +01:00
Dmitriy Zaporozhets 5f0535ac91 Improve merge request version feature
* Use version numbers instead of sha as more user-friendly
* Make it clear that we compare later version (left) with older one (right)
* Improve wording of version switch panel

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-09-07 10:24:48 +03:00
Dmitriy Zaporozhets ffdfdc27e5 Expand abbreviations in merge request version path helper
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-09-07 10:24:48 +03:00
Dmitriy Zaporozhets 8b2e065b7b Compare merge request version against other version on changes page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-09-07 10:22:57 +03:00
Dmitriy Zaporozhets 9b5a83816e Add link to compare merge request versions
It adds a dropdown to the right of merge request version dropdown and
allow you to choose older version for compare. Once clicked it will take
user to compare page with older and newer versions sha pre-filled

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-09-07 10:22:57 +03:00
Katarzyna Kobierska c9c2503c51 User can edit closed MR with deleted fork
Add test for closed MR without fork

Add view test visibility of Reopen and Close buttons

Fix controller tests and validation method

Fix missing space

Remove unused variables from test

closed_without_fork? method refactoring

Add information about missing fork

When closed MR without fork can't edit target branch

Tests for closed MR edit view

Fix indentation and rebase, refactoring
2016-08-30 13:05:40 +02:00
Robert Speicher 72b055d0d2 Merge branch 'mr-close-btn' into 'master'
Correctly shows close button on merge requests

Closes #19403 

See merge request !5036
2016-07-11 18:00:55 +00:00
Phil Hughes b684517907 Moved merge request button visibility out of issue_helper 2016-07-11 08:51:18 +01:00
Rémy Coutable 140a706e96 Merge branch 'retrieve-mr-closes-issues-just-when-required' into 'master'
Avoid calculation of closes_issues.

## What does this MR do?

Avoid unneeded calls to MR closes issues

## Are there points in the code the reviewer needs to double check?

I'm not sure if calling this method from a view is a good practice, but I cannot see another simple way of avoiding this problem. In case we want to avoid this in the controller we need to specify the action, format and status of the merge request, because in that case we know that the `_open` partial will render. We could add some lazy evaluation but it not a thing I see in use along the app but feedback is welcome

## What are the relevant issue numbers?

#14202 , #19490

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- ~~[ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~[ ] API support added~~
- Tests
  - ~~[ ] Added for this feature/bug~~
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5140
2016-07-08 16:13:08 +00:00
Paco Guzman 664e4c125e Avoid calculation of closes_issues.
We just need to get merge requests closes issues when 
we’re going to show them
2016-07-07 15:01:02 +02:00
Douwe Maan 6ce25e7b4c Rename MergeRequest methods that return commits or shas to be more clear and consistent 2016-07-06 18:50:58 -04:00
Kamil Trzcinski f898e52a00 ci_build_details_path should return nil if builds_page result is nil
This is required since we parse URI later and remove the credentials
2015-12-22 00:28:36 +01:00
Marvin Frick 0d05400bde removes api credentials from link to build_page
Also adds a spec for MergeRequestHelper to avoid having a regression
later on.
2015-12-22 00:28:19 +01:00
Robert Speicher d2f9a9012d Merge branch 'link-refs' into 'master'
Recognize issue/MR/snippet/commit links as references.

Fixes #3744 and #3745

See merge request !1933
2015-12-04 20:58:45 +00:00
Douwe Maan 74a81cbfe3 Fix branch rendering 2015-12-02 17:30:50 +01:00
Douwe Maan 7a65cb3abf Don't reset target branch when choosing to "Change branches" in MR 2015-12-02 14:23:13 +01:00
Douwe Maan 8f43298d96 Show local issues and MRs in "This X closes... / closed by..." sentence 2015-11-30 21:09:36 +01:00