summaryrefslogtreecommitdiff
path: root/spec/services/merge_requests/merge_service_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add frozen_string_literal to spec/servicesfrozen_string_literal_spec_servicesThong Kuah2019-04-121-0/+2
| | | | Probably useful as we often move these files to "new" files.
* [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-081-2/+2
| | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* Allow custom hooks errors to appear in GitLab UILuke Duncalfe2019-03-261-1/+1
| | | | | | | | | | | | | | | | | | 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
* Revert "Merge branch 'sh-show-pre-receive-error-merge' into 'master'"Luke Duncalfe2019-03-081-1/+1
| | | This reverts merge request !25708
* Show pre-receive error message in merge request widgetStan Hu2019-03-021-1/+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
* Check authorization in merge servicesOswaldo Ferreira2019-02-251-0/+12
| | | | | Move authorization checks to merge services instead relying solely on external checks.
* Allow custom squash commit messagesLuke Duncalfe2019-02-061-1/+1
|
* Retrieve merge request closing issues from database cacheFelipe Artur2018-08-061-0/+1
|
* Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao2018-07-111-1/+1
|
* Updates from `rubocop -a`Lin Jen-Shin2018-07-091-1/+1
|
* Don't use Gitlab::Utils.nlbr in Gitlab::GitJacob Vosmaer (GitLab)2018-06-111-1/+1
|
* Add 'squash and rebase' feature to CEblackst0ne-squash-and-merge-in-gitlab-core-ceblackst0ne2018-05-291-13/+47
|
* Save and expose only generic merge errorJan Provaznik2018-05-021-2/+2
| | | | | | | | | | | | | | | | | | When an error occurs during merge, the error message is exposed to user and it is also saved in DB. This error message may be user unfriendly (as in !41820) and it could also expose a detailed backend information. Instead of displaying the specific error message, only sanitized generic message is displayed. This is potentially controversial change because disadvantage is that user doesn't get specific reason of failure. Additional changes: * repository.merge including exceptions is is extracted into a separate method to make things clearer * update! is used instead of update so we don't silently ignore an error Related to !41857
* Clear caches before updating MR diffsZeger-Jan van de Weg2017-12-141-4/+4
| | | | | | The hook ordering influenced the diffs being generated as these used values from before the update due to the memoization still being in place. This commit reorders them and tests against this behaviour.
* Prevent fast forward merge when rebase is requiredissue_39773_beFelipe Artur2017-11-101-0/+22
|
* Make merge_jid handling less stateful in MergeServiceOswaldo Ferreira2017-10-271-49/+0
|
* add specmicael.bergeron2017-10-111-7/+16
|
* Clean merge_jid whenever necessary on the merge process38476-improve-merge-jid-cleanup-on-merge-processOswaldo Ferreira2017-09-271-3/+20
| | | | MergeRequest#merge_jid should be cleaned up whenever we hit a known error on MergeService#execute. This way we can keep track if the MR is really "ongoing" or "stuck"
* Cleans merge_jid when possible on MergeService36114-stuck-mrs-job-follow-upOswaldo Ferreira2017-08-281-5/+28
|
* Track enqueued and ongoing MRsOswaldo Ferreira2017-08-281-0/+9
|
* Move GitHooksService to Gitlab::GitJacob Vosmaer2017-08-231-1/+1
|
* Use described_class when possibleRémy Coutable2017-07-271-7/+7
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Prevent accidental deletion of protected MR source branch by repeating ↵dm-always-verify-source-branch-can-be-deletedDouwe Maan2017-07-041-11/+58
| | | | checks before actual deletion
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-3/+3
|
* Correct RSpec/SingleLineHook cop offensesRobert Speicher2017-06-141-1/+3
|
* Show merge errors in merge request widgetSean McGivern2017-02-161-9/+20
| | | | | | | | | | | | | | | | | There were two problems here: 1. On the JS side, the reference to $widgetBody didn't refer to the right DOM element any more. This might be because it was replaced by the `getMergeStatus` method. Even if it wasn't, ensuring we have the right element means that the content gets updated. 2. On the Ruby side, the `log_merge_error` method didn't update the `merge_error` column of the merge request. Change that to update if requested, and update in the most common cases by default. Additionally, this would sometimes return an error hash, but it doesn't look like this was ever used (the return value of `MergeService#execute` appears to be unused everywhere).
* Refactor JiraService by moving code out of JiraService#execute methodclean-up-jira-serviceAdam Niedzielski2016-12-011-1/+1
| | | | | | | | | | The implicit interface of project services states that the "execute" method is meant to be called when project hooks are executed. Currently JiraService does not support any project events even though JiraService#supported_events says that "commit" and "merge_request" are supported. They are only used to render correct options in JIRA configuration screen, but they are not supported. Because of that, this commit makes "execute" method a no-op.
* Rephrase some system notes to be compatible with new system note stylerephrase-system-notesDouwe Maan2016-11-241-1/+1
|
* Allow enabling and disabling commit and MR events for JIRAissue_5541Felipe Artur2016-11-181-0/+16
|
* Add JIRA remotelinks and prevent duplicated closing messagesFelipe Artur2016-11-181-2/+4
|
* Prevent wrong markdown on issue ids when project has Jira service activatedissue_828Felipe Artur2016-10-191-0/+12
|
* Improve error logging of MergeServiceStan Hu2016-10-181-2/+2
| | | | Relates to #23505
* Add markdown cache columns to the database, but don't use them yetNick Thomas2016-10-071-1/+4
| | | | | | | | | | | | This commit adds a number of _html columns and, with the exception of Note, starts updating them whenever the content of their partner fields changes. Note has a collision with the note_html attr_accessor; that will be fixed later A background worker for clearing these cache columns is also introduced - use `rake cache:clear` to set it off. You can clear the database or Redis caches separately by running `rake cache:clear:db` or `rake cache:clear:redis`, respectively.
* Fix bug when trying to cache closed issues from external issue trackersissue_22446Felipe Artur2016-10-031-0/+36
|
* Close todos when accepting a MR via the API.Tony Gambone2016-09-291-0/+24
|
* adds second batch of tests changed to active tenseactive-tense-test-coveragetiagonbotelho2016-08-091-2/+2
|
* Properly abort a merge when merge conflicts occurreject-merge-conflictsStan Hu2016-07-291-0/+11
| | | | | | | | | | | If somehow a user attempted to accept a merge request that had conflicts (e.g. the "Accept Merge Request" button or the MR itself was not updated), `MergeService` did not properly detect that a conflict occurred. It would assume that the MR went through without any issues and close the MR as though everything was fine. This could cause data loss if the source branch were removed. Closes #20425
* Avoid `describe`-ing symbols in specsrs-describe-symbolsRobert Speicher2016-07-121-1/+1
|
* Handle custom Git hook result in GitLab UIValery Sizov2016-07-041-0/+10
|
* Allows MR authors to have the source branch removed when merging the MRJeroen Jacobs2016-05-201-0/+15
|
* Merge branch 'master' into split-up-buildsDouwe Maan2015-12-091-4/+5
|\
| * Merge branch 'master' into merge-if-greenZeger-Jan van de Weg2015-12-071-1/+3
| |\
| * | Specs for 'Merge When Build Succeeds'Zeger-Jan van de Weg2015-12-021-4/+4
| | |
* | | Tag service specsDouwe Maan2015-12-091-1/+1
| |/ |/|
* | test fixValery Sizov2015-11-301-2/+3
|/
* Improve error message when merging failsmr_improve_errors_handlingValery Sizov2015-10-011-0/+14
|
* Revert "Merge branch 'revert-satellites' into 'master' "Dmitriy Zaporozhets2015-08-111-5/+0
| | | | | This reverts commit 5daf44b7c86e0e2641a902b1da8b01d91fa3dbfa, reversing changes made to 2f706fbd231cabe7a76a5d17ac44285aaaf8592c.
* Revert "Merge branch 'drop-satellites'"Dmitriy Zaporozhets2015-08-111-0/+5
| | | | | | | This reverts commit 957e849f41d96fa9778fcdd06792d2f0274b29ab, reversing changes made to 6b9dbe9f5a175a8162abf296367f561bab3eea1a. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix merge request creation without branch selectedDmitriy Zaporozhets2015-08-051-5/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>