summaryrefslogtreecommitdiff
path: root/app/services/merge_requests
Commit message (Collapse)AuthorAgeFilesLines
* [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-082-15/+9
| | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* Fix merge requst relationships with pipeline in MWPSServicefix-merge-request-relations-with-pipeline-on-mwpsShinya Maeda2019-04-052-14/+3
| | | | | | MWPSService currently uses the old pipeline lookup method. It searches related merge requests with pipeline.ref, however, this doesn't work for attached/detached merge request pipelines.
* Backport attached merge request pipelinescreate-merge-pipelines-ceShinya Maeda2019-04-041-9/+11
| | | | Backport changes to CE
* Check mergeability in merge to ref servicecheck-mergeability-in-merge-to-ref-serviceShinya Maeda2019-04-011-3/+1
| | | | | | | | | | and add spec Add changelog ok ok
* Merge branch 'persist-fulll-ref-path-for-mr-pipelines' into 'master'Kamil Trzciński2019-03-293-9/+21
|\ | | | | | | | | | | | | Use merge request HEAD ref for detached merge request pipelines Closes #58454 See merge request gitlab-org/gitlab-ce!25504
| * Create detached merge request pipelinespersist-fulll-ref-path-for-mr-pipelinesShinya Maeda2019-03-293-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using `refs/merge-requests/:iid/head` ok ok Improve naming nicely Add nice tests add nice tests fix some more revert
* | Add a thin encapsulation around .pluck(:id)Nick Thomas2019-03-281-3/+1
|/
* Merge branch '54670-external-diffs-when-outdated' into 'master'Sean McGivern2019-03-281-0/+23
|\ | | | | | | | | | | | | Allow external diffs to be used conditionally Closes #54670 See merge request gitlab-org/gitlab-ce!25432
| * Allow external diffs to be used conditionallyNick Thomas2019-03-271-0/+23
| | | | | | | | | | | | | | | | | | | | Since external diffs are likely to be a bit slower than in-database ones, add a mode that makes diffs external after they've been obsoleted by events. This should strike a balance between performance and disk space. A background cron drives the majority of migrations, since diffs become outdated through user actions.
* | Merge branch 'osw-multi-line-suggestions-creation-strategy' into 'master'Andreas Brandl2019-03-271-0/+9
|\ \ | |/ |/| | | | | Prepares suggestion implementation for multi-line support See merge request gitlab-org/gitlab-ce!26057
| * Prepare suggestion implementation for multi-lineOswaldo Ferreira2019-03-271-0/+9
| | | | | | | | | | | | Adds the groundwork needed in order to persist multi-line suggestions, while providing the parsing strategy which will be reused for the **Preview** as well.
* | Allow custom hooks errors to appear in GitLab UILuke Duncalfe2019-03-261-2/+2
|/ | | | | | | | | | | | | | | | | | Error messages from custom pre-receive hooks now appear in the GitLab UI. This is re-enabling a feature that had been disabled in merge request https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18646 The feature had been disabled due to security concerns that information which was not intended to be public (like stack traces) would leak into public view. PreReceiveErrors (from pre-receive, post-receive and update custom hooks) are now filtered for messages that have been prefixed in a particular way. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/48132
* Disallow reopening of locked merge requestsJan Beckmann2019-03-081-1/+1
| | | | Fixes #56864
* Revert "Merge branch 'sh-show-pre-receive-error-merge' into 'master'"Luke Duncalfe2019-03-081-1/+2
| | | This reverts merge request !25708
* Provide reliable source and target IDsOswaldo Ferreira2019-03-061-1/+6
| | | | | Returns the source and target IDs used to create the merge commit on Gitaly.
* Ref merge does not fail upon FF config enabledOswaldo Ferreira2019-03-061-9/+1
|
* Merge dev master into GitLab.com masterYorick Peterse2019-03-041-0/+1
|\
| * Merge branch 'security-2773-milestones-fix' into 'master'Yorick Peterse2019-03-041-0/+1
| |\ | | | | | | | | | | | | [master] Check issue milestone availability See merge request gitlab/gitlabhq!2788
| | * Check issue milestone availabilityJarka Košanová2019-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add project when creating milestone in specs We validate milestone is from the same project/parent group as issuable -> we need to set project in specs correctly Improve methods names and specs organization
* | | Show pre-receive error message in merge request widgetStan Hu2019-03-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a merge fails due to a locked file, no feedback was given to the user as to why it failed if the user used the Merge button. However, if the push attempt happened directly in the Web UI, the pre-receive message would be displayed. To be consistent and to make it clear why a merge failed, we now include the pre-receive error message in the merge request widget. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/10165
* | | Add suffix for merge request eventShinya Maeda2019-03-011-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix ok Add spec Fix ok Fix Add changelog Fix Add memoization a fix
* | Move error check to pvtOswaldo Ferreira2019-02-251-4/+6
| |
* | Extend error checking to be overwritten in EEOswaldo Ferreira2019-02-253-0/+8
| |
* | Add feature-flag supportOswaldo Ferreira2019-02-251-1/+3
| | | | | | | | | | Returns error in MergeToRefService when merge_to_tmp_merge_ref_path ff is disabled.
* | Check authorization in merge servicesOswaldo Ferreira2019-02-253-8/+34
| | | | | | | | | | Move authorization checks to merge services instead relying solely on external checks.
* | Support merge to ref for merge-commit and squashOswaldo Ferreira2019-02-253-37/+116
|/ | | | | | | | Adds the ground work for writing into the merge ref refs/merge-requests/:iid/merge the merge result between source and target branches of a MR, without further side-effects such as mailing, MR updates and target branch changes.
* Enable fast task lists for merge requestsBrett Walker2019-02-071-1/+6
| | | | Allow single tasks to be updated quickly
* Allow custom squash commit messagesLuke Duncalfe2019-02-062-20/+44
|
* Move validation logic to service layerHiroyuki Sato2019-01-281-0/+1
|
* Refactor the logic of updating head pipelinesShinya Maeda2019-01-041-15/+1
| | | | Sort out some logic
* Merge branch 'blackst0ne-bump-rails-cve-2018-16476' into 'master'Grzegorz Bizon2019-01-021-2/+4
|\ | | | | | | | | Bump Ruby on Rails to 5.0.7.1 See merge request gitlab-org/gitlab-ce!23396
| * Bump Ruby on Rails to 5.0.7.1blackst0ne-bump-rails-cve-2018-16476blackst0ne2018-12-211-2/+4
| | | | | | | | Fix the CVE-2018-16476 vulnerability.
* | Merge branch 'security-bvl-fix-cross-project-mr-exposure' into 'master'John Jarvis2019-01-011-7/+17
|\ \ | | | | | | | | | | | | [master] Validate projects in MR build service See merge request gitlab/gitlabhq!2678
| * | Validate projects in MR build serviceBob Van Landuyt2018-12-141-7/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This validates the correct abilities for both projects. Only `read_project` isn't enough: For the `source_project` we validate `create_merge_request_from` this also validates that the user has developer access to the project. For the `target_project` we validate `create_merge_reqeust_in` this also validates that the user has access to the project's repository. To avoid generating diffs for unrelated projects we also validate that the projects are in the same fork network now.
* | Change deprecated `except!` usagesRobert Speicher2018-12-161-4/+5
|/ | | | | These can just be `delete` calls, with the caveat that it only takes one argument.
* Guard with feature flagMark Chao2018-12-071-5/+10
|
* Update merge request's merge_commit for branch updateMark Chao2018-12-071-5/+14
| | | | | | | | | Analyze new commits graph to determine each commit's merge commit. Fix "merged with [commit]" info for merge requests being merged automatically by other actions. Allow analyzing upto the relevant commit
* Merge request pipelinesShinya Maeda2018-12-053-5/+21
|
* Handle force_remove_source_branch when creating merge requestsh-fix-issue-51220Stan Hu2018-11-211-0/+1
| | | | | | | | | Creating a merge request with `merge_request[force_remove_source_branch]` parameter would result in an Error 500 since this attribute was passed directly to the merge request. Fix this by properly parsing this attribute into `merge_params`. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51220
* Merge branch '40085-add-a-create_merge_request-quick-action' into 'master'Douwe Maan2018-11-201-2/+4
|\ | | | | | | | | | | | | Resolve "Add a `/create_merge_request` quick action" Closes #40085 See merge request gitlab-org/gitlab-ce!22485
| * Creates /create_merge_request quickaction40085-add-a-create_merge_request-quick-actionJacopo2018-11-141-2/+4
| | | | | | | | | | | | | | With this quick action the user can create a new MR starting from the current issue using as `source_branch` the given `branch name` and as `target_branch` the project default branch. If the `branch name` is omitted a name is automatically created starting from the issue title.
* | Comment on any expanded diff line on MRsosw-comment-on-any-line-on-diffs-w-feature-flagOswaldo Ferreira2018-11-091-4/+0
|/
* Revert "Merge branch 'osw-comment-on-any-line-on-diffs' into 'master'"osw-revert-comment-in-any-diff-lineOswaldo Ferreira2018-11-071-0/+4
| | | | | This reverts commit a82a595728d54bdc12e51dfcfb22e9eddc449143, reversing changes made to e7df959b8f99875edd246c7ac7779c3203e8755e.
* Merge branch 'bvl-patches-via-mail' into 'master'Douwe Maan2018-11-071-1/+5
|\ | | | | | | | | | | | | Allow to add patches to merge requests created via email Closes #40830 See merge request gitlab-org/gitlab-ce!22723
| * Allow limiting quick actions to executeBob Van Landuyt2018-11-071-1/+3
| | | | | | | | | | | | Sometimes we don't want to trigger any quick actions that cause side effects. For example when building a record to validate. This allows listing the quick actions that need to be performed.
| * Apply patches when creating MR via emailBob Van Landuyt2018-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows users to add patches as attachments to merge request created via email. When an email to create a merge request is sent, all the attachments ending in `.patch` will be applied to the branch specified in the subject of the email. If the branch did not exist, it will be created from the HEAD of the repository. When the patches could not be applied, the error message will be replied to the user. The patches can have a maximum combined size of 2MB for now.
* | Revert "Merge branch 'blackst0ne-update-push-new-merge-request-url' into ↵Douwe Maan2018-11-071-2/+2
|/ | | | | 'master'" This reverts merge request !22526
* Merge branch 'osw-comment-on-any-line-on-diffs' into 'master'Douwe Maan2018-11-071-4/+0
|\ | | | | | | | | Comment on any expanded diff line on MRs See merge request gitlab-org/gitlab-ce!22398
| * Comment on any expanded diff line on MRsOswaldo Ferreira2018-11-061-4/+0
| |
* | Set @push early for EEee-1012-assign-code-owner-as-approverMark Chao2018-11-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In EE, there is need to call `merge_requests_for_source_branch` before calling CE's `refresh_merge_requests, in order to obtain the old diffs. However that requires `@push`, initialized inside CE's refresh_merge_requests. However it can't be set early in EE, or static analysis would fail because use of instance variables in module is discouraged. So @push is set in execute instead.