summaryrefslogtreecommitdiff
path: root/spec/services/merge_requests
Commit message (Collapse)AuthorAgeFilesLines
* Add a project forks spec helperBob Van Landuyt2017-10-073-13/+19
| | | | | The helper creates a fork of a project with all provided attributes, but skipping the creation of the repository on disk.
* Merge branch '18608-lock-issues-v2' into 'master'Sean McGivern2017-10-061-1/+10
|\ | | | | | | | | | | | | Resolve "Lock issue and merge request" Closes #18608 See merge request gitlab-org/gitlab-ce!14531
| * Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Jarka Kadlecova2017-10-032-3/+31
| |\ | | | | | | | | | | | | | | | | | | 18608-lock-issues-v2 # Conflicts: # db/schema.rb
| * \ Merge remote-tracking branch 'origin/master' into 18608-lock-issuesLuke "Jared" Bennett2017-09-202-2/+2
| |\ \
| * \ \ Merge remote-tracking branch 'origin/master' into 18608-lock-issuesLuke "Jared" Bennett2017-09-181-3/+1
| |\ \ \
| * | | | Create system notes for MR too, improve doc + clean up codeJarka Kadlecova2017-09-141-0/+7
| | | | |
| * | | | Support discussion locking in the backendJarka Kadlecova2017-09-141-1/+3
| | | | |
* | | | | Merge branch 'master' into ff_port_from_eeEric Eastwood2017-09-282-3/+31
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Conflicts: app/models/project.rb db/schema.rb
| * | | | Clear merge requests counter cache after mergeSean McGivern2017-09-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, the MR counter in the sidebar would be wrong if an MR had been merged since the last update, but not opened or closed, as merging did not trigger a counter cache update.
| * | | | 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"
* | | | Merge branch 'master' into ff_port_from_eeEric Eastwood2017-09-262-2/+2
|\ \ \ \ | |/ / /
| * | | Fix refreshing of issues/MR count cachesfix-counts-cachingYorick Peterse2017-09-192-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures the open issues/MR count caches are refreshed properly when creating new issues or MRs. This MR also includes a change to the cache keys to ensure all caches are rebuilt on the fly. This particular problem was not caught in the test suite due to a null cache being used, resulting in all calls that would use a cache using the underlying data directly. In production the code would fail because a newly saved record returns an empty hash in #changes meaning checks such as `state_changed? || confidential_changed?` would return false for new rows, thus never updating the counters. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38061
* | | Add spec for FfMergeServiceValery Sizov2017-09-191-0/+84
|/ /
* | Prepare Repository#merge for migration to Gitalyoperation-service-mergeJacob Vosmaer2017-09-151-3/+1
|/
* 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
|
* Merge branch 'git-operation-user' into 'master'Sean McGivern2017-08-241-1/+1
|\ | | | | | | | | Move GitHooksService into Gitlab::Git See merge request !13739
| * Move GitHooksService to Gitlab::GitJacob Vosmaer2017-08-231-1/+1
| |
* | Merge branch 'cache-issue-and-mr-counts' into 'master'Douwe Maan2017-08-233-14/+32
|\ \ | |/ |/| | | | | | | | | Cache the number of open issues and merge requests Closes #36622 See merge request !13639
| * Cache the number of open issues and merge requestsYorick Peterse2017-08-233-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every project page displays a navigation menu that in turn displays the number of open issues and merge requests. This means that for every project page we run two COUNT(*) queries, each taking up roughly 30 milliseconds on GitLab.com. By caching these numbers and refreshing them whenever necessary we can reduce loading times of all these pages by up to roughly 60 milliseconds. The number of open issues does not include confidential issues. This is a trade-off to keep the code simple and to ensure refreshing the data only needs 2 COUNT(*) queries instead of 3. A downside is that if a project only has 5 confidential issues the counter will be set to 0. Because we now have 3 similar counting service classes the code previously used in Projects::ForksCountService has mostly been moved to Projects::CountService, which in turn is reused by the various service classes. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36622
* | Merge branch '35343-inherit-milestones-and-labels' into 'master'Sean McGivern2017-08-211-2/+18
|\ \ | |/ |/| | | | | | | | | copy milestones and labels from issue when using create merge request button Closes #35343 See merge request !13461
| * [skip ci] changelog and minor style changes addedhaseeb2017-08-181-2/+2
| |
| * moved merge parms to servicehaseeb2017-08-171-21/+12
| |
| * tests for inheriting milestones and labelshaseeb2017-08-111-1/+26
| |
* | Don't create event in Merge Request Create ServiceJarka Kadlecova2017-08-161-0/+10
| |
* | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2017-08-111-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 36089-handle-ref-failure-better * upstream/master: (62 commits) Update gitlab.po: Missing 'r' in "Fouché" that comes from "Fourcher" verb. Docs: update user docs index Fix minor typos in views Fix Layout/SpaceBeforeBlockBraces violation in bin/changelog_spec Merge branch 'rs-alphanumeric-ssh-params' into 'security-9-4' Merge branch 'import-symlinks-9-3' into 'security-9-3' Fix wrong method call on prometheus histogram Document new all-in-one Helm chart - docs Fix 404 on link path Fix line numbers not matching up to code in code viewer. Hide overflow-x on collapsed sidebar removed global use of breakpoint checker Increase performance of the breakpoint size checker Filter sensitive query string parameters from NGINX access logs Added a template for database changes Render new issue link in failed job as a regular link instead of a UJS one Include RE2 in the upgrade docs Remove affix plugin from issuable sidebar with new navigation Fix linter error alternative route for download archive ...
| * Enable the Layout/SpaceBeforeBlockBraces coprc/enable-the-Layout/SpaceBeforeBlockBraces-copRémy Coutable2017-08-091-1/+1
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Fix more testsLin Jen-Shin2017-08-111-4/+4
|/
* Don't include EmailHelpers manually, pick with rspecuse-rspec-support-helperLin Jen-Shin2017-08-031-3/+1
| | | | | | | | | `:mailer` is needed to pick it easily, while `type: :mailer` is needed for picking it automatically for tests located in spec/mailers/*_spec.rb It's a bit complicated in spec/services/notification_service_spec.rb but we'll leave it alone for now.
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-2/+2
|
* Merge issuable "reopened" state into "opened"merge-issuable-reopened-into-opened-stateYorick Peterse2017-07-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having two states that essentially mean the same thing is very much like having a boolean "true" and boolean "mostly-true": it's rather silly. This commit merges the "reopened" state into the "opened" state while taking care of system notes still showing messages along the lines of "Alice reopened this issue". A big benefit from having only two states (opened and closed) is that indexing and querying becomes simpler and more performant. For example, to get all the opened queries we no longer have to query both states: SELECT * FROM issues WHERE project_id = 2 AND state IN ('opened', 'reopened'); Instead we can query a single state directly, which can be much faster: SELECT * FROM issues WHERE project_id = 2 AND state = 'opened'; Further, only having two states makes indexing easier as we will only ever filter (and thus scan an index) using a single value. Partial indexes could help but aren't supported on MySQL, complicating the development process and not being helpful for MySQL.
* Use described_class when possibleRémy Coutable2017-07-274-16/+16
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-2711-11/+11
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Support both internal and external issue trackersJarka Kadlecova2017-07-241-1/+1
|
* Merge branch 'fix-mrs-merged-immediately' into 'master'Robert Speicher2017-07-071-10/+44
|\ | | | | | | | | | | | | Don't mark empty MRs as merged on push to the target branch Closes #32800 See merge request !12711
| * 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!
* | Native group milestonesFelipe Artur2017-07-071-3/+3
|/
* 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-217-37/+36
|
* Rename "Slash commands" to "Quick actions"Eric Eastwood2017-06-151-2/+2
| | | | | | | | | | | | | Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070 Deprecate "chat commands" in favor of "slash commands" We looked for things like: - `slash commmand` - `slash_command` - `slash-command` - `SlashCommand`
* Correct RSpec/SingleLineHook cop offensesRobert Speicher2017-06-144-6/+18
|
* Only add a description change note when no tasks are updatedJared Deckard2017-06-121-0/+13
|
* Move diffable? method from Repository to Diff::Filedm-diff-file-diffableDouwe Maan2017-06-081-2/+2
|
* Keep trailing newline when picking conflict sections32983-merge-conflict-resolution-removed-the-newline-in-the-end-of-fileSean McGivern2017-06-011-3/+39
| | | | | If our side of the conflict file has a trailing newline, and we are picking sections, not editing the whole content, then add a trailing newline back.
* Merge branch 'issue_32225_2' into 'master'Kamil Trzciński2017-05-301-0/+31
|\ | | | | | | | | Set head pipeline when creating merge requests See merge request !11669
| * Set head pipeline when creating merge requestsissue_32225_2Felipe Artur2017-05-291-0/+31
| |
* | Fix counters cache invalidation for Issues and Merge RequestsValery Sizov2017-05-263-0/+19
|/
* Add transient head_pipeline_of to pipeline factoriesissue_32225Felipe Artur2017-05-222-13/+10
|
* Stop MR conflict code from blowing up when branches are missingdm-no-conflicts-when-branches-are-missingDouwe Maan2017-05-181-0/+7
|
* [Spec optimization] Joining one-line 'it' blocksspec-joining-itValery Sizov2017-05-152-19/+29
|