summaryrefslogtreecommitdiff
path: root/spec/services/merge_requests/refresh_service_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Prevent triggering pipelines when target branch is updatedprevent-running-mr-pipelines-when-target-updatedShinya Maeda2019-04-081-7/+27
| | | | | | Currently, pipelines for merge requests are triggered when source or target branch is updated. However, we should create only when source branch is updated, because it runs unexpected pipelines.
* Autocorrect with RSpec/ExampleWording copThong Kuah2019-04-051-5/+5
| | | | | | | - rewords examples starting with 'should' - rewords examples starting with 'it' Note: I had to manually fixup "onlies" to "only"
* Backport attached merge request pipelinescreate-merge-pipelines-ceShinya Maeda2019-04-041-11/+0
| | | | Backport changes to CE
* Create detached merge request pipelinespersist-fulll-ref-path-for-mr-pipelinesShinya Maeda2019-03-291-7/+34
| | | | | | | | | | | | | | | | | | By using `refs/merge-requests/:iid/head` ok ok Improve naming nicely Add nice tests add nice tests fix some more revert
* Prepare suggestion implementation for multi-lineOswaldo Ferreira2019-03-271-9/+29
| | | | | | 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.
* Add suffix for merge request eventShinya Maeda2019-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix ok Add spec Fix ok Fix Add changelog Fix Add memoization a fix
* Move validation logic to service layerHiroyuki Sato2019-01-281-3/+3
|
* Don't create merge request pipeline without commitsHiroyuki Sato2019-01-201-2/+6
|
* Add committers and authors methods on MergeRequestTiago Botelho2019-01-081-1/+1
| | | | These are used by the EE-only approvers feature
* Guard with feature flagMark Chao2018-12-071-9/+33
|
* Update merge request's merge_commit for branch updateMark Chao2018-12-071-0/+49
| | | | | | | | | 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-051-0/+88
|
* Fix extra merge request versions created from forked merge requestssh-fix-issue-53153Stan Hu2018-10-291-0/+60
| | | | | | | | | | | | | | | | | | | | | | | When a forked merge request was created with the same branch name as the target name, MergeRequests::RefreshService would always create a new diff even though nothing had changed. For example, on GitLab.com: 1. There were a number of merge requests in the gitlab-ce and www-gitlab-com projects that had old merge requests from the community. 2. These merge requests originated from forked projects and used the source branch master. 3. When someone pushed to master in the main repository, MergeRequests::RefreshService would see that master matched the merge requests in question and generated a new diff. 4. This led to an explosion of merge request diffs and slowed down the "Changes" tab considerably. This change alters MergeRequests::RefreshService so that it will only refresh the diff if the merge request's source project and branch match. Otherwise, the refresh will only happen if a pushed commit contains a commit relevant to the existing merge request. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53153
* Send notification emails when push to a merge requestYarNayar/gitlab-ce-23460-send-email-when-pushing-more-commits-to-the-merge-requestYarNayar2018-03-261-0/+21
| | | | Closes #23460
* Fix and improve stubbed test for WIP commit refOswaldo Ferreira2018-02-021-31/+15
|
* Reload MRs memoization after diffs creationosw-system-notes-for-commits-regressionOswaldo Ferreira2018-02-011-0/+8
|
* Close and do not reload MR diffs when source branch is deletedOswaldo Ferreira2018-01-291-2/+23
|
* Replace '.team << [user, role]' with 'add_role(user)' in specs36782-replace-team-user-role-with-add_role-user-in-specsblackst0ne2017-12-221-2/+2
|
* Ensure pippeline corresponds with the sha of an MRJarka Kadlecova2017-12-051-0/+14
|
* Include the changes in issuable webhook payloadsRémy Coutable2017-10-091-4/+4
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add a project forks spec helperBob Van Landuyt2017-10-071-3/+5
| | | | | The helper creates a fork of a project with all provided attributes, but skipping the creation of the repository on disk.
* Prepare Repository#merge for migration to Gitalyoperation-service-mergeJacob Vosmaer2017-09-151-3/+1
|
* Use described_class when possibleRémy Coutable2017-07-271-1/+1
| | | | 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>
* Don't mark empty MRs as merged on push to the target branchfix-mrs-merged-immediatelySean McGivern2017-07-071-10/+44
| | | | | | | | | | | | | | When we push to an MR's target branch, we check if the MR's HEAD commit is contained in the push. This lets us mark MRs as merged if they were merged manually. However, we also added a feature where you can create an empty MR from an issue. If that MR is created around the time of a merge to the default branch, we would process the push after creating the MR, and consider it to be a manual merge. To fix that, we exclude empty MRs from this process. If they are empty, they were empty before the push we're processing, so we shouldn't touch them!
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-8/+8
|
* Enable the Style/TrailingCommaInLiteral copRémy Coutable2017-05-101-1/+1
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Search for opened MRs - include reopened MRs30291-reopen-mrJarka Kadlecova2017-04-061-0/+27
|
* Use `:empty_project` where possible in service specsRobert Speicher2017-03-271-3/+3
|
* Speed up MergeRequest::RefreshService spec by combining examplessh-speed-up-refresh-serviceStan Hu2017-03-081-47/+57
|
* Update occurrences of MWBS to MWPSfix/mwbs-to-mwpsJames Lopez2017-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Mark as WIP based on MR commits onlyJarka Kadlecova2017-02-131-9/+32
|
* Backport changes from EE squashSean McGivern2017-02-031-1/+1
| | | | | | | 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>
* Backport EE changes on approvals reset for closed MRsbackport-ee-1051-approvals-reset-on-closed-mrOswaldo Ferreira2017-01-231-14/+37
|
* Mark MR as WIP when pushing WIP commitsjurre2017-01-191-0/+64
|
* Do not reload diff for merge request made from fork when target branch in ↵do-not-refresh-main-when-fork-target-branch-updatedAdam Niedzielski2016-12-091-9/+19
| | | | | | | | | | | fork is updated The target branch of a merge request has to be a branch in the project for which the merge request is submitted. When a branch changes in a fork, it does not make sense to reload diffs of merge requests in the upstream project that use the same branch name as the target branch. Please note that it does make sense to reload diffs when the source branch changes.
* Rephrase some system notes to be compatible with new system note stylerephrase-system-notesDouwe Maan2016-11-241-8/+8
|
* Revert "Do not create a MergeRequestDiff record when source branch is deleted"Adam Niedzielski2016-11-211-10/+0
| | | | This reverts commit f913170e2f76ef44800f0272cb7fb40b9d6709ee.
* Do not create a MergeRequestDiff record when source branch is deletedfix-merge-request-screen-deleted-source-branchAdam Niedzielski2016-11-161-0/+10
| | | | | | In order to have a valid MergeRequestDiff record when need head_commit_sha. When a source branch is deleted head_commit_sha is nil. This causes an exception in merge request "Changes" tab.
* Extract project#update_merge_requests and SystemHooks to its own worker from ↵15463-extract-update-merge-requestsPaco Guzman2016-10-131-1/+2
| | | | GitPushService
* refactors tests because of gitlab-test repository changes20708-new-branch-is-immediatelly-tagged-as-mergedtiagonbotelho2016-10-111-2/+2
|
* Close todos when accepting a MR via the API.Tony Gambone2016-09-291-6/+6
|
* Add a spec for merge request metric caching while refreshing a merge request ↵Timothy Andrew2016-09-211-7/+29
| | | | from a forked project.
* Use the `IssuableBaseService` lifecycle hooks to cache ↵Timothy Andrew2016-09-211-1/+1
| | | | | | | `MergeRequestsClosingIssues` - Instead of overriding `create` and `update` in `MergeRequests::BaseService` - Get all merge request service specs passing
* Implement a second round of review comments from @DouweM.Timothy Andrew2016-09-211-1/+1
| | | | | | | | | | | | | | - Don't use `TableReferences` - using `.arel_table` is shorter! - Move some database-related code to `Gitlab::Database` - Remove the `MergeRequest#issues_closed` and `Issue#closed_by_merge_requests` associations. They were either shadowing or were too similar to existing methods. They are not being used anywhere, so it's better to remove them to reduce confusion. - Use Rails 3-style validations - Index for `MergeRequest::Metrics#first_deployed_to_production_at` - Only include `CycleAnalyticsHelpers::TestGeneration` for specs that need it. - Other minor refactorings.
* Test all cycle analytics pre-calculation code.Timothy Andrew2016-09-191-0/+30
| | | | | | | | | | | | | All the code that pre-calculates metrics for use in the cycle analytics page. - Ci::Pipeline -> build start/finish - Ci::Pipeline#merge_requests - Issue -> record default metrics after save - MergeRequest -> record default metrics after save - Deployment -> Update "first_deployed_to_production_at" for MR metrics - Git Push -> Update "first commit mention" for issue metrics - Merge request create/update/refresh -> Update "merge requests closing issues"
* adds second batch of tests changed to active tenseactive-tense-test-coveragetiagonbotelho2016-08-091-2/+2
|
* webhooks: include old revision in MR update eventsBen Boeckel2016-08-011-3/+3
|
* Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""Rémy Coutable2016-07-181-2/+1
| | | | | | | | This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50. See !4892. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Revert "Merge branch '18193-developers-can-merge' into 'master' "Robert Speicher2016-07-131-1/+2
| | | | | This reverts commit 9ca633eb4c62231e4ddff5466c723cf8e2bdb25d, reversing changes made to fb229bbf7970ba908962b837b270adf56f14098f.