summaryrefslogtreecommitdiff
path: root/app/services/merge_requests
Commit message (Collapse)AuthorAgeFilesLines
* Fix closing issues text added to MRs for external issue trackersSean McGivern2018-02-141-2/+2
| | | | | | | | Before, this would: 1. Not use the correct reference for non-JIRA external trackers. 2. Append 'Closes ' if an external tracker was enabled, but no issue matched the branch name.
* Fix Error 500s creating merge requests with external issue trackersh-fix-issue-43193Stan Hu2018-02-121-3/+5
| | | | | | | | When JIRA or Redmine were enabled and the branch name did not match the matching regular expression, the `issue_iid` would be `nil`, preventing users from creating merge requests. Closes #43193
* Remove allow_n_plus_1_calls from MergeRequests::CreateServicefix/reduce-number-of-ref-exists-callsAhmad Sherif2018-02-071-4/+1
| | | | | Fixes #37439 Fixes gitaly#1000
* Merge branch '40793-fix-mr-title-for-jira' into 'master'Sean McGivern2018-02-021-7/+23
|\ | | | | | | | | | | | | Resolve "Incorrect merge request title when Jira activated and multiple commits on branch" Closes #40793 See merge request gitlab-org/gitlab-ce!16491
| * Resolve "Incorrect merge request title when Jira activated and multiple ↵Andrew McCallum2018-02-021-7/+23
| | | | | | | | commits on branch"
* | Reload MRs memoization after diffs creationosw-system-notes-for-commits-regressionOswaldo Ferreira2018-02-011-1/+6
|/
* Close and do not reload MR diffs when source branch is deletedOswaldo Ferreira2018-01-291-2/+14
|
* Merge branch 'sh-backport-10-3-4-security-fixes' into 'master'Oswaldo Ferreira2018-01-171-6/+22
|\ | | | | | | | | Backport 10.3.4 security fixes into master See merge request gitlab-org/gitlab-ce!16509
| * Merge branch '41567-projectfix' into 'security-10-3'Sean McGivern2018-01-161-6/+22
| | | | | | | | | | | | | | | | | | | | check project access on MR create See merge request gitlab/gitlabhq!2273 (cherry picked from commit 1fe2325d6ef2bced4c5e97b57691c894f38b2834) 43e85f49 check project access on MR create
* | Merge branch '41727-target-branch-name' into 'master'Sean McGivern2018-01-171-0/+1
|\ \ | |/ |/| | | | | | | | | Set target_branch to the ref branch when creating MR from issue Closes #41727 See merge request gitlab-org/gitlab-ce!16422
| * Set target_branch to the ref branch when creating MR from issue41727-target-branch-nameJarka Kadlecová2018-01-171-0/+1
| |
* | Merge branch 'Ben305/gitlab-ce-36669-default-mr-title-with-external-issues' ↵Grzegorz Bizon2018-01-111-6/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Resolve "Incorrect default merge request title when Jira activated" Closes #36669 See merge request gitlab-org/gitlab-ce!16356
| * | Never set special MR titles for external issuesSean McGivern2018-01-101-6/+2
| | |
| * | Fix incorrect default merge request title when external issue tracker is ↵Benedikt Huss2018-01-091-1/+1
| |/ | | | | | | activated
* | Store only generic message if rebase fails4020-rebase-messageJan Provaznik2018-01-091-3/+5
|/ | | | | | | | | | Instead of storing detailed rebase error, only a generic message is stored with MR. The reason is that this message is exposed and displayed to end user and there is no reason to expose detailed backend information. Error message is still logged so detailed information can be found in logfile by admin if needed. Related #41820
* Backport 'Rebase' feature from EE to CEjprovazn-rebaseJan Provaznik2018-01-052-0/+54
| | | | | | | | | | | | | | When a project uses fast-forward merging strategy user has to rebase MRs to target branch before it can be merged. Now user can do rebase in UI by clicking 'Rebase' button instead of doing rebase locally. This feature was already present in EE, this is only backport of the feature to CE. Couple of changes: * removed rebase license check * renamed migration (changed timestamp) Closes #40301
* Merge branch 'osw-introduce-merge-request-statistics' into 'master'Sean McGivern2018-01-044-3/+38
|\ | | | | | | | | Improve closed/merged events queries performance on Projects::MergeRequestsController#show.json See merge request gitlab-org/gitlab-ce!15642
| * Cache merged and closed events data in merge_request_metrics tableOswaldo Ferreira2018-01-024-3/+38
| |
* | Incorporate ConflictsService.ListConflictFiles Gitaly RPCAlejandro Rodríguez2017-12-271-1/+1
|/
* diff notes created in merge request on a commit have the right contextmicael.bergeron2017-12-071-1/+1
| | | | add a spec for commit merge request diff notes
* Ensure pippeline corresponds with the sha of an MRJarka Kadlecova2017-12-051-0/+1
|
* Create merge request from emailJan Provaznik2017-12-052-2/+12
| | | | | | | | | | | * new merge request can be created by sending an email to the specific email address (similar to creating issues by email) * for the first iteration, source branch must be specified in the mail subject, other merge request parameters can not be set yet * user should enable "Receive notifications about your own activity" in user settings to receive a notification about created merge request Part of #32878
* Merge branch ↵Sean McGivern2017-11-292-32/+58
|\ | | | | | | | | | | | | | | | | '21143-customize-branch-name-when-using-create-branch-in-an-issue' into 'master' Resolve "Customize branch name when using create branch in an issue" Closes #21143 See merge request gitlab-org/gitlab-ce!13884
| * Add an ability to use a custom branch name on creation from issuesVitaliy @blackst0ne Klachkov2017-11-252-32/+58
| |
* | Merge branch ↵Rémy Coutable2017-11-281-3/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | '40530-merge-request-generates-wrong-diff-when-branch-and-tag-have-the-same-name' into 'master' Resolve "Merge request generates wrong diff when branch and tag have the same name" Closes #40530 See merge request gitlab-org/gitlab-ce!15591
| * | Ensure MRs always use branch refs for comparisonSean McGivern2017-11-281-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a merge request was created with a branch name that also matched a tag name, we'd generate a comparison to or from the tag respectively, rather than the branch. Merging would still use the branch, of course. To avoid this, ensure that when we get the branch heads, we prepend the reference prefix for branches, which will ensure that we generate the correct comparison.
* | | Refactor the way we pass `old associations` to issuable's update services40226-refactor-the-issuable-s-webhooks-data-architectureRémy Coutable2017-11-242-6/+7
|/ / | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'issue_40374' into 'master'Sean McGivern2017-11-241-14/+0
|\ \ | | | | | | | | | | | | | | | | | | Fix WIP system note not being created Closes #40374 See merge request gitlab-org/gitlab-ce!15528
| * | Fix WIP system note not being createdissue_40374Felipe Artur2017-11-231-14/+0
| |/
* | Use latest_merge_request_diff associationSean McGivern2017-11-231-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compared to the merge_request_diff association: 1. It's simpler to query. The query uses a foreign key to the merge_request_diffs table, so no ordering is necessary. 2. It's faster for preloading. The merge_request_diff association has to load every diff for the MRs in the set, then discard all but the most recent for each. This association means that Rails can just query for N diffs from N MRs. 3. It's more complicated to update. This is a bidirectional foreign key, so we need to update two tables when adding a diff record. This also means we need to handle this as a special case when importing a GitLab project. There is some juggling with this association in the merge request model: * `MergeRequest#latest_merge_request_diff` is _always_ the latest diff. * `MergeRequest#merge_request_diff` reuses `MergeRequest#latest_merge_request_diff` unless: * Arguments are passed. These are typically to force-reload the association. * It doesn't exist. That means we might be trying to implicitly create a diff. This only seems to happen in specs. * The association is already loaded. This is important for the reasons explained in the comment, which I'll reiterate here: if we a) load a non-latest diff, then b) get its `merge_request`, then c) get that MR's `merge_request_diff`, we should get the diff we loaded in c), even though that's not the latest diff. Basically, `MergeRequest#merge_request_diff` is the latest diff in most cases, but not quite all.
* Merge branch 'osw-merge-process-logs' into 'master'Sean McGivern2017-11-201-0/+12
|\ | | | | | | | | Add logs for monitoring the merge process See merge request gitlab-org/gitlab-ce!15425
| * Add MR reference to logsOswaldo Ferreira2017-11-201-5/+5
| |
| * Add logs for monitoring the merge processosw-merge-process-logsOswaldo Ferreira2017-11-161-0/+12
| |
* | Merge branch '18040-rubocop-line-break-after-guard-clause' into 'master'Rémy Coutable2017-11-201-0/+1
|\ \ | | | | | | | | | | | | | | | | | | Adds Rubocop rule for line break after guard clause Closes #18040 See merge request gitlab-org/gitlab-ce!15188
| * | Adds Rubocop rule for line break after guard clauseJacopo2017-11-161-0/+1
| | | | | | | | | | | | Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
* | | Add total_time_spent to the `changes` hash in issuable Webhook payloads40122-only-one-note-webhook-is-triggered-when-a-comment-with-time-spent-is-addedRémy Coutable2017-11-151-4/+4
|/ / | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Prevent fast forward merge when rebase is requiredissue_39773_beFelipe Artur2017-11-101-11/+16
|/
* CE port of code changed for epicsjk-epic-changes-ce-portJarka Kadlecova2017-11-021-4/+6
|
* Refresh open Issue and Merge Request project counter caches when re-openingRob Ede2017-10-301-0/+1
|
* Make merge_jid handling less stateful in MergeServiceOswaldo Ferreira2017-10-271-8/+1
|
* Merge branch '38236-remove-build-failed-todo-if-it-has-been-auto-retried' ↵Grzegorz Bizon2017-10-161-1/+1
|\ | | | | | | | | | | | | | | | | into 'master' Resolve "Remove "Build failed" TODO if it has been auto-retried" Closes #38236 See merge request gitlab-org/gitlab-ce!14869
| * Don't create build failed todo when build is retried38236-remove-build-failed-todo-if-it-has-been-auto-retriedSean McGivern2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | When a build is retried automatically, we close any open todos. However, we do that _before_ creating a new build failed todo. To solve this, we check if the build is retried before creating the todo. We also ensure that the build _instance_ has the correct attribute set, without needing to reload it from the database.
* | Create a Gitlab::Git submodule for conlict-related filesAlejandro Rodríguez2017-10-121-1/+1
| | | | | | | | Rename classes to (hopefully) clearer names while we're doing that.
* | Refactor conflict resolution to contain git ops within Gitlab::GitAlejandro Rodríguez2017-10-122-3/+3
| | | | | | | | | | This prepares the codebase for a Gitaly migration. See https://gitlab.com/gitlab-org/gitaly/issues/553
* | Encapsulate git operations for conflict resolution into libAlejandro Rodríguez2017-10-121-46/+2
|/
* fix a whitespace34897-delete-branch-after-mergeMicael Bergeron2017-10-121-1/+1
|
* fix for discussionMicael Bergeron2017-10-121-3/+4
|
* fix the merger override to remove source branchmicael.bergeron2017-10-111-5/+8
|
* Start adding Gitlab::HookData::IssuableBuilderRémy Coutable2017-10-091-4/+4
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Include the changes in issuable webhook payloadsRémy Coutable2017-10-092-8/+8
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>