summaryrefslogtreecommitdiff
path: root/spec/models/merge_request_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Update occurrences of MWBS to MWPSfix/mwbs-to-mwpsJames Lopez2017-03-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Only create unmergeable todos onceonly-create-unmergeable-todo-onceSean McGivern2017-02-241-6/+0
| | | | | | | | | | | | | | | | | | Previously, we created an unmergeable todo when a merge request: 1. Had merge when pipeline succeeds set. 2. Became unmergeable. However, when merge when pipeline succeeds fails due to unmergeability, the flag isn't actually removed. And a merge request can become unmergeable multiple times, as every time the target branch is updated we need to re-check the mergeable status. This means that if the todo was marked done, and the MR was checked again, a new todo would be created for the same event. Instead of checking this, we should create the todo from the service responsible for merging when the pipeline succeeds. That way the todo is guaranteed to only be created when we care about it.
* Fix MR changes tab size countfix-mr-size-with-over-100-filesSean McGivern2017-02-231-0/+44
| | | | | | | | This was wrong when there were over 100 files in the diff, because we did not use the same diff options as subclasses of `Gitlab::Diff::FileCollection::Base` when getting the raw diffs. (The reason we don't use those classes directly is because they may perform highlighting, which isn't needed for just counting the diffs.)
* Merge branch 'restore-issues_mentioned_but_not_closing' into 'master'Sean McGivern2017-02-081-3/+3
|\ | | | | | | | | pass in current_user in MergeRequest and MergeRequestsHelper See merge request !8624
| * Remove MergeRequest#closes_issue?; Remove the default parameter value for ↵Dongqing Hu2017-01-311-3/+3
| | | | | | | | #cache_merge_request_closes_issues! and #issues_mentioned_but_not_closing
* | Address feedbackDouwe Maan2017-02-061-5/+11
| |
* | Improve performance of finding last deployed environmentDouwe Maan2017-02-061-24/+0
| |
* | Add testsDouwe Maan2017-02-061-0/+24
| |
* | Convert most MergeRequest model specs to use `:empty_project`Robert Speicher2017-01-191-22/+22
| |
* | Merge branch '23524-notify-automerge-user-of-failed-build' into 'master' Sean McGivern2017-01-191-1/+9
|\ \ | |/ |/| | | | | | | | | Notify the user who set auto-merge when merge is not possible Closes #23524 See merge request !8056
| * Notify the user who set auto-merge when merge conflict occurstwonegatives2017-01-141-1/+9
| |
* | Address MR commentsJarka Kadlecova2017-01-131-0/+6
| |
* | support `/merge` slash comand for MRsJarka Kadlecova2017-01-111-0/+96
| |
* | Fix cross-project references copy to include the project referencefix/cross-project-ref-pathJames Lopez2017-01-031-0/+4
| | | | | | | | Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
* | use MergeRequest#closes_issues instead of rewriting code to retrieve closing ↵Gabriel Gizotti2016-12-281-3/+7
| | | | | | | | issues on MergeRequest#issues_mentioned_but_not_closing
* | Change closes issues reference text on MergeRequest#merge_commit_message to ↵Gabriel Gizotti2016-12-161-3/+3
| | | | | | | | match existing text generated by the system
* | Show either description or closes issues references on ↵Gabriel Gizotti2016-12-161-1/+1
| | | | | | | | MergeRequest#merge_commit_message so closes issues references are not duplicated
* | backend completely drives creation of merge commit messageGabriel Gizotti2016-12-161-0/+14
| |
* | describe #closes_issues and describe # #issues_mentioned_but_not_closing on ↵Gabriel Gizotti2016-12-161-24/+14
| | | | | | | | merge_request_spec.rb
* | only look for issues mentioned on description on ↵Gabriel Gizotti2016-12-161-1/+1
| | | | | | | | MergeRequest#issues_mentioned_but_not_closing
* | introduce MergeRequest#issues_mentioned_but_not_closingGabriel Gizotti2016-12-161-15/+30
| |
* | Remove whole description from #merge_commit_message and add add closed issuesGabriel Gizotti2016-12-161-4/+10
|/
* Merge branch 'jej-note-search-uses-finder' into 'security' Douwe Maan2016-12-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix missing Note access checks in by moving Note#search to updated NoteFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 ## Which fixes are in this MR? :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested ### Note lookup without access check - [x] :white_check_mark: app/finders/notes_finder.rb:13 :download_code check - [x] :white_check_mark: app/finders/notes_finder.rb:19 `SnippetsFinder` - [x] :white_check_mark: app/models/note.rb:121 [`Issue#visible_to_user`] - [x] :white_check_mark: lib/gitlab/project_search_results.rb:113 - This is the only use of `app/models/note.rb:121` above, but importantly has no access checks at all. This means it leaks MR comments and snippets when those features are `team-only` in addition to the issue comments which would be fixed by `app/models/note.rb:121`. - It is only called from SearchController where `can?(current_user, :download_code, @project)` is checked, so commit comments are not leaked. ### Previous discussions - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_13_13 `: download_code` check on commit - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_19_19 `SnippetsFinder` should be used - `SnippetsFinder` should check if the snippets feature is enabled -> https://gitlab.com/gitlab-org/gitlab-ce/issues/25223 ### Acceptance criteria met? - [x] Tests added for new code - [x] TODO comments removed - [x] Squashed and removed skipped tests - [x] Changelog entry - [ ] State Gitlab versions affected and issue severity in description - [ ] Create technical debt issue for NotesFinder. - Either split into `NotesFinder::ForTarget` and `NotesFinder::Search` or consider object per notable type such as `NotesFinder::OnIssue`. For the first option could create `NotesFinder::Base` which is either inherited from or which can be included in the other two. - Avoid case statement anti-pattern in this finder with use of `NotesFinder::OnCommit` etc. Consider something on the finder for this? `Model.finder(user, project)` - Move `inc_author` to the controller, and implement `related_notes` to replace `non_diff_notes`/`mr_and_commit_notes` See merge request !2035
* Merge branch '23589-open-issue-for-mr' into 'master' Sean McGivern2016-12-061-0/+40
|\ | | | | | | | | Create an issue for all unresolved discussions in an MR See merge request !7180
| * Feature: delegate all open discussions to IssueBob Van Landuyt2016-12-051-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | When a merge request can only be merged when all discussions are resolved. This feature allows to easily delegate those discussions to a new issue, while marking them as resolved in the merge request. The user is presented with a new issue, prepared with mentions of all unresolved discussions, including the first unresolved note of the discussion, time and link to the note. When the issue is created, the discussions in the merge request will get a system note directing the user to the newly created issue.
* | Merge branch 'glm-shorthand-reference' into 'master' Sean McGivern2016-12-061-3/+6
|\ \ | |/ |/| | | | | | | | | GLM shorthand reference for projects from the same namespace Closes #21679 See merge request !7255
| * Add shorthand support to gitlab markdown referencesOswaldo Ferreira2016-12-021-3/+6
| |
* | Merge branch 'fix/rename-mwbs-to-merge-when-pipeline-succeeds' into 'master' Kamil Trzciński2016-12-051-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename MWBS service to Merge When Pipeline Succeeds ## What does this MR do? This MR renames Merge When Build Succeeds feature to Merge When Pipeline Succeeds, because we recently changed the behavior, see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6675. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] All builds are passing ## What are the relevant issue numbers? Closes #23354 See merge request !7135
| * Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon2016-11-301-9/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (110 commits) Rewrite an HTTP link to use HTTPS Edit /spec/features/profiles/preferences_spec.rb to match changes in 084d90ac Add blue back to sub nav active Remove JSX/React eslint plugins. Fix a transient spec failure Adds hoverstates for collapsed Issue/Merge Request sidebar Moved groups above projects Add StackProf to the Gemfile, along with a utility to get a profile for a spec Update Sidekiq-cron to fix compatibility issues with Sidekiq 4.2.1 Add a CHANGELOG entry Alert user when logged in user email is not the same as the invitation Expose timestamp in build entity used by serializer Rename `MergeRequest#pipeline` to `head_pipeline` Remove unnecessary database indexes CE-specific changes gitlab-org/gitlab-ee#1137 Fixing typo & Clarifying Key name fix started_at check fix blob controller spec failure - updated not to use file-path- fix blob controller spec failure Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' ... Conflicts: app/controllers/projects/merge_requests_controller.rb lib/api/merge_requests.rb spec/requests/api/merge_requests_spec.rb
| * \ Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon2016-11-251-1/+73
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (312 commits) Fix bad selection on dropdown menu for tags filter Fixed issue boards scrolling with a lot of lists & issues You can only assign default_branch when editing a project ... Don't convert data which already is the target type Stop supporting Google and Azure as backup strategies renames some of the specs and adds changelog entry Fixed dragging issue moving wrong issue after multiple drags of issue Fixed issue boards issue sorting when dragging issue into list Rephrase some system notes to be compatible with new system note style Add missing JIRA file that redirects to the new location Fix documentation to create the `pg_trm` extension before creating the DB Document that we always use `do...end` for `before` in RSpec Backport Note#commands_changes from EE Log mv_namespace parameters Add default_branch attr to Project API payload in docs. Fix title case to sentence case properly escape username validation error message flash Remove header ids from University docs Add missing documentation. Added test that checks the correct select box is there for the LFS ... ... Conflicts: app/services/system_note_service.rb spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb spec/services/system_note_service_spec.rb
| * | | Update some docs to reflect MWPS name changeGrzegorz Bizon2016-11-211-1/+1
| | | |
* | | | Replace references to MergeRequestDiff#commits with st_commitsuse-st-commits-where-possibleAdam Niedzielski2016-12-011-7/+26
| |_|/ |/| | | | | | | | | | | | | | when we care only about the number of commits We do not have to instantiate all objects in this case.
* | | Rename `MergeRequest#pipeline` to `head_pipeline`fix/rename-merge-request-head-pipelineGrzegorz Bizon2016-11-291-9/+9
| |/ |/|
* | Correctly determine mergeability of MR with no discussions24863-mrs-without-discussions-are-mergeableDouwe Maan2016-11-231-0/+54
| |
* | Fix a wrong "The build for this merge request failed" message24616-mr-shows-the-build-for-this-merge-request-failed-although-builds-still-runningRémy Coutable2016-11-211-1/+19
|/ | | | | | | Also allow merge request to be merged with skipped pipeline and the "only allow merge when pipeline is green" feature enabled Signed-off-by: Rémy Coutable <remy@rymai.me>
* Complete and improve specsRémy Coutable2016-11-041-23/+16
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add setting to only allow merge requests to be merged when all discussions ↵Rodolfo Santos2016-11-041-1/+57
| | | | | | are resolved Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'show-commit-status-from-source-project' into 'master' Douwe Maan2016-10-251-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show commits from source project. Be consistent with pipeline ## What does this MR do? Show commits from source project instead of target project. ## Why was this MR needed? To be consistent. ## 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) - Tests - [x] Added for this feature/bug ## What are the relevant issue numbers? Closes #3596 See merge request !6658
| * Make sure merge request was created before deleting sourceshow-commit-status-from-source-projectLin Jen-Shin2016-10-251-1/+2
| |
* | Remove redundant class_name and foreign_key overridesDavid Wagner2016-10-241-2/+2
|/ | | | | | They were Rails' default and are unnecessarily overridden. Signed-off-by: David Wagner <david@marvid.fr>
* Rename forked_source_project_missing? to source_project_missing?Nick Thomas2016-10-201-4/+4
|
* Revert "Add #closed_without_source_project?"Nick Thomas2016-10-201-32/+0
| | | | | | This reverts commit 31c37c6c38258684fc92e0d91119c33872e39034. See #23341
* Merge branch '21444-pipeliens-new-mr' into 'master' Fatih Acet2016-10-191-17/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pipelines tab to new MR #### What does this MR do? Adds pipelines tab to new MRs #### Screenshots (if relevant) ![Screen_Shot_2016-10-10_at_10.23.27_AM](/uploads/6c3f8f2be0cf9ba7cc78f6d918307ec0/Screen_Shot_2016-10-10_at_10.23.27_AM.png) ![Screen_Shot_2016-10-11_at_8.59.45_AM](/uploads/e67577d92327eafef6f04073f3d94212/Screen_Shot_2016-10-11_at_8.59.45_AM.png) #### What are the relevant issue numbers? Closes #21444 See merge request !6238
| * Extend merge request tests for all commits methodGrzegorz Bizon2016-10-181-17/+41
| |
* | Merge remote-tracking branch 'upstream/master' into pipeline-emailspipeline-emailsLin Jen-Shin2016-10-181-6/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (58 commits) Update endpoint to username validator change border color to variable Add todo for deprecated user routes and more information about deprecation to changelog Provide better error message to the user Apply better hierarchy to markdown headers and issue/mr titles Swapped button text manipulation outcomes for the toggle query Fixed find file keyboard navigation Update CHANGELOG for 8.12.7 Added download-button class and applied button margin Enable activerecord_sane_schema_dumper for test Updated logo from @luke Fix broken specs on MySQL after https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6896 Fix Test Env (proper error handling when gitlab-shell is not clonned) Fix randomly crashing spinach test for merge request [Great spinach fix] Replace gsub with delete Remove carriage returns from commit description as summary is on a newline and will always include carriage returns Convert due_date_select.js filetype to es6. Stop directly parsing due_date with Date.parse, prefer parsing implicitly. Improve spec for pipeline metrics worker Add Pipeline metrics worker ...
| * Fix MR model specSean McGivern2016-10-131-6/+6
| |
* | Just show the first merge request we found, feedback:Lin Jen-Shin2016-10-141-8/+0
| | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019#note_16963209
* | Merge remote-tracking branch 'upstream/master' into pipeline-emailsLin Jen-Shin2016-10-141-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (237 commits) Grapify boards API Add test, fix merge error Use local assigns to get the dropdown title Updated issuable dropdown titles Added safety check for formatted values Minor style improvement Fixed conflict and corrected teaspoon test Rename method in test Moved ci_status environments logic to new action ci_envrionments_status and set up frontend polling Refactor ci_status on MergeRequestController Fix indenting error in HAML Show what time ago a MR was deployed Fixed missing links Fixed missing links Refactor merge requests revisions Add link to update docs for source installations Grapify todos API Link to review apps example from docs fix grafana_configuration.md move link Do not run before_script, artifacts, cache in trigger_docs job ...
| * refactors tests because of gitlab-test repository changes20708-new-branch-is-immediatelly-tagged-as-mergedtiagonbotelho2016-10-111-2/+2
| |
* | Introduce Pipeline#merge_requests_with_active_first,Lin Jen-Shin2016-10-141-1/+9
|/ | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019#note_16956802