summaryrefslogtreecommitdiff
path: root/app/models/merge_request.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-101-0/+9
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-071-0/+4
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-181-3/+3
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-161-12/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-131-0/+2
|
* Backport changes for 16252 in EE add current_user to report comparison servicesCan Eldem2019-09-111-3/+4
|
* Use delete_all for deleting eventsevents-delete-allJan Provaznik2019-09-071-1/+1
| | | | | | Because we don't have any destroy callbacks (or other logic triggered on event destroy), there is no reason for deleting events inefficiently one by one, instead we can use :delete_all.
* Extend License Compliance entity for Pipelines and MR viewCan Eldem2019-09-051-2/+2
|
* Add structure to support EE feature of COARKerri Miller2019-09-051-0/+6
| | | | | | | These are the structural changes for supporting the EE feature of moving "code_owner_approval_required" state from existing on a project to being on the protected branches individually, allowing for CODEOWNER validation on push events.
* Add pipeline.type key to PipelineEntityadd-pipeline-type-key-in-pipeline-entityShinya Maeda2019-09-031-0/+4
| | | | | This commit adds pipeline.type key to PipelineEntity. This key will be used in MR widget in the next iteration.
* Only read rebase status from the modelNick Thomas2019-08-151-12/+1
| | | | | | | | | | | | | | | | | | | Prior to 12.1, rebase status was looked up directly from Gitaly. In https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14417 , a DB column was added to track the status instead. However, we couldn't stop looking at the gitaly status immediately, since some rebases may been running across the upgrade. Now that we're in 12.3, it is safe to remove the direct-to-gitaly lookup. This also happens to fix a 500 error that is seen when viewing an MR for a fork where the source project has been removed. We still look at the Gitaly status in the service, just in case Gitaly and Sidekiq get out of sync - I assume this is possible, and it's a relatively cheap check. Since we atomically check and set `merge_requests.rebase_jid`, we should never enqueue two `RebaseWorker` jobs in parallel.
* Split MR widget into cached and non-cached serializersIgor2019-08-091-0/+16
| | | | | | | | | Splits auto-refreshing of MR widget into 2 requests: - the one which uses etag-caching and invalidates the fields on change - the one without caching The idea is to gradually move all the fields to etag-cached endpoint
* CE port for bulk updating group labelsEugenia Grieff2019-08-081-0/+1
| | | | - Original EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14827
* Add exclusive lease to mergeability check processosw-avoid-errors-due-to-concurrent-callsOswaldo Ferreira2019-07-311-1/+1
| | | | | | | | Concurrent calls to UserMergeToRef RPC updating a single ref can lead to an opaque fail that is being rescued at Gitaly. So this commit adds an exclusive lease to the mergeability check process with the key as the current MR ID.
* Further remove code branches by database typeAndreas Brandl2019-07-291-8/+1
| | | | | | | | We dropped MySQL support and a lot of mysql specific code has been removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608. This comes in from the other direction and removes any `if postgresql?` branches.
* Merge branch 'dz-remove-old-ignore-column' into 'master'Robert Speicher2019-07-161-5/+0
|\ | | | | | | | | Remove old ignore_column in AR models See merge request gitlab-org/gitlab-ce!30725
| * Remove old ignore_column in AR modelsdz-remove-old-ignore-columnDmitriy Zaporozhets2019-07-151-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Next models are affected: * Project * Namespace * Issue * Merge request * CI Trigger * CI Pipeline schedule Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Add commit_id to AttributeCleaner::ALLOWED_REFERENCESgeorgekoltsov/63955-fix-import-with-source-branch-deletedGeorge Koltsov2019-07-151-3/+5
| |
* | Always return MR diff_refs if importingGeorge Koltsov2019-07-111-0/+2
|/ | | | | | | This change fixes a bug that prevents projects being imported when there are diff notes present in merge requests. Solves https://gitlab.com/gitlab-org/gitlab-ce/issues/63955
* Fix race condition on merge train ref generationrun-pipeline-for-merge-train-at-train-ref-ceShinya Maeda2019-07-081-0/+13
| | | | | | | | | Today, Pipelines for merge train run on `refs/merge`, however, this causes a race condition that it can be overwritten by CheckMergeabilityService. This patch fixes the problem by generating `refs/train` for those pipelines.
* Allow asynchronous rebase operations to be monitoredNick Thomas2019-07-041-1/+27
| | | | | | | | | This MR introduces tracking of the `rebase_jid` for merge requests. As with `merge_ongoing?`, `rebase_in_progress?` will now return true if a rebase is proceeding in sidekiq. After one release, we should remove the Gitaly-based lookup of rebases. It is much better to track this kind of thing via the database.
* Update TODO: allow_collaboration column renamingfix-todo-allow_collaborationMark Chao2019-07-031-0/+1
|
* Use actual_head_pipeline to enforce presenceFabio Pitino2019-06-251-2/+2
|
* Require pipeline if "Pipeline must succeed" is setrequire-pipeline-when-enabling-only-allow-merge-if-pipeline-succeedsFabio Pitino2019-06-251-1/+1
| | | | | | | | | | | | | | | When a user sets only_allow_merge_if_pipeline_succeeds, also named as "Pipeline must succeed" project setting, we require the pipeline to be present. This solves race condition issues especially with external CI providers when a build is triggered externally but no pipelines are created in GitLab yet. Document that a head pipeline is expected when using "Pipeline must succeed" setting. Also explain limitations with the use of only/except where there may not be any jobs created and the merge request will not be allowed to be merged.
* Avoid touching the MR status if MR is not openedOswaldo Ferreira2019-06-211-4/+0
|
* Automatically update MR merge-ref along merge statusOswaldo Ferreira2019-06-201-21/+19
| | | | | | | | | | | | This couples the code that transitions the `MergeRequest#merge_status` and refs/merge-requests/:iid/merge ref update. In general, instead of directly telling `MergeToRefService` to update the merge ref, we should rely on `MergeabilityCheckService` to keep both the merge status and merge ref synced. Now, if the merge_status is `can_be_merged` it means the merge-ref is also updated to the latest. We've also updated the logic to be more systematic and less user-based.
* Raise an error if creating the MergeRequestDiff failsNick Thomas2019-06-131-1/+1
|
* Revert "Automatically update MR merge-ref along merge status"Oswaldo Ferreira2019-06-111-15/+21
|
* Create BaseService for Auto Merge architecturecreate-base-class-for-auto-merge-architectureShinya Maeda2019-06-061-15/+0
| | | | It abstracts some codes for common methods in AutoMerge::*Services.
* Merge branch 'osw-sync-merge-ref-upon-mergeability-check' into 'master'Douwe Maan2019-06-031-21/+15
|\ | | | | | | | | | | | | Automatically update MR merge-ref along merge status Closes #58495 See merge request gitlab-org/gitlab-ce!28513
| * Add payload to the service responseOswaldo Ferreira2019-05-311-4/+0
| | | | | | | | | | This introduces payload to the ServiceResponse with the merge ref HEAD commit data
| * Simplify merge_ref_head methodsOswaldo Ferreira2019-05-311-6/+4
| |
| * Automatically update MR merge-ref along merge statusOswaldo Ferreira2019-05-311-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | This couples the code that transitions the `MergeRequest#merge_status` and refs/merge-requests/:iid/merge ref update. In general, instead of directly telling `MergeToRefService` to update the merge ref, we should rely on `MergeabilityCheckService` to keep both the merge status and merge ref synced. Now, if the merge_status is `can_be_merged` it means the merge-ref is also updated to the latest. We've also updated the logic to be more systematic and less user-based.
* | Merge dev.gitlab.org master into GitLab.com masterYorick Peterse2019-06-031-0/+12
|\ \
| * \ Merge branch 'security-60039' into 'master'GitLab Release Tools Bot2019-06-031-0/+12
| |\ \ | | |/ | |/| | | | | | | Disallow invalid MR branch name See merge request gitlab/gitlabhq!3052
| | * Validate MR branch namesMark Chao2019-05-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents refspec as branch name, which would bypass branch protection when used in conjunction with rebase. HEAD seems to be a special case with lots of occurrence, so it is considered valid for now. Another special case is `refs/head/*`, which can be imported.
* | | Abstract auto merge processesShinya Maeda2019-06-031-6/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | We have one auto merge strategy today - Merge When Pipeline Succeeds. In order to add more strategies for Merge Train feature, we abstract the architecture to be more extensible. Removed arguments Fix spec
* | Fix remaining failures in shoulda-matcherStan Hu2019-05-211-0/+2
| | | | | | | | | | | | | | | | | | Starting with Rails 5, belongs_to now adds a presence validation to the association, and so as of shoulda-matchers 4.0.0 the belong_to matcher follows suit and tests that this validation is there by setting the association to nil and asserting that there are validation errors. This exposed an error with the `validate_branches` method: we need to check the source and target project exist.
* | Fix merge request pipeline exist methodfix-merge-request-pipeline-exist-methodShinya Maeda2019-05-061-7/+3
| | | | | | | | Refactor
* | Fix environment automatic on_stop triggerShinya Maeda2019-04-301-0/+10
| | | | | | | | | | | | | | Due to the nature of pipelines for merge requests, deployments.ref can be a merge request ref instead of a branch name. We support the environment auto-stop hook for this case
* | Upgrade Rails to 5.1.6.1Jasper Maes2019-04-231-1/+1
| | | | | | | | Model.new.attributes now also returns encrypted attributes.
* | Backport changes from EEMatija Čupić2019-04-161-1/+1
| | | | | | | | | | This backports the changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10452
* | [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-081-47/+4
|/ | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* Do not show system notes on commits in the MR page55268-exclude-system-notes-from-commits-in-mrHeinrich Lee Yu2019-04-021-9/+10
|
* Backport splitting approval changes from CEIgor2019-04-021-6/+2
| | | | | | | Author and committers approvals are split in EE This commit provides backports for those changes This reverts commit 886f00bcba23d67e2c86591c2eb5359ef457a2f9.
* Merge branch 'issue_51789_part_1' into 'master'Sean McGivern2019-04-021-0/+4
|\ | | | | | | | | | | | | Migrate issuable states to integer patch 1 of 2 Closes #51789 See merge request gitlab-org/gitlab-ce!25107
| * Merge masterFelipe Artur2019-03-271-41/+90
| |\
| * \ Merge branch 'master' into issue_51789_part_1Felipe Artur2019-02-191-4/+4
| |\ \
| * | | Fix broken specsFelipe Artur2019-02-141-1/+1
| | | |
| * | | Split background migration for issues and merge requestsFelipe Artur2019-02-141-1/+1
| | | |