Commit Graph

24 Commits

Author SHA1 Message Date
GitLab Bot 3e7f2f00ca Add latest changes from gitlab-org/gitlab@master 2021-05-12 03:10:21 +00:00
GitLab Bot be4b3134a2 Add latest changes from gitlab-org/gitlab@master 2021-05-04 15:10:36 +00:00
GitLab Bot ede2fbdc87 Add latest changes from gitlab-org/gitlab@master 2021-04-12 09:09:09 +00:00
GitLab Bot 1769b59b9f Add latest changes from gitlab-org/gitlab@master 2021-04-01 18:13:56 +00:00
GitLab Bot 3775eba7c1 Add latest changes from gitlab-org/gitlab@master 2020-10-16 12:09:33 +00:00
GitLab Bot 4c5468b408 Add latest changes from gitlab-org/gitlab@master 2020-06-24 15:08:50 +00:00
GitLab Bot a8de96bff5 Add latest changes from gitlab-org/gitlab@master 2020-03-05 18:08:19 +00:00
GitLab Bot 0ba3a054d2 Add latest changes from gitlab-org/gitlab@master 2020-01-10 09:07:49 +00:00
GitLab Bot ab7cf450ba Add latest changes from gitlab-org/gitlab@master 2019-12-03 18:06:49 +00:00
GitLab Bot 6e81d7f628 Add latest changes from gitlab-org/gitlab@master 2019-11-15 15:06:12 +00:00
Oswaldo Ferreira 84dd31493e [CE port] Bypass push rules for merge to ref service
Turns out push rules to validate commit message does
not apply in the context of automatic merge to
the refs/merge-requests/:iid/merge. Mainly because
if it fails to merge to it, we currently can't give enough
preemptive feedback to the user and it'll turn the
merge request unmergeable (given we automatically
mark it as unmergeable if we can't merge to the ref).

In general, it's a systematic operation, which already
bypasses user authorization and git hooks.

Therefore, this commit makes it bypass the push rules
at EE as well.
2019-07-09 14:36:29 -03:00
Shinya Maeda f8d6f7322e Fix race condition on merge train ref generation
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.
2019-07-08 14:36:32 +07:00
Shinya Maeda 48307fac1e Extend MergeToRefService for creating merge ref from the other ref
Currently, MergeToRefService is specifically designed for
createing merge commits from source branch and target branch of
merge reqeusts. We extend this behavior to source branch and any
target ref paths.
2019-07-05 17:15:10 +07:00
Oswaldo Ferreira 3af348b6cf Automatically update MR merge-ref along merge status
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.
2019-06-20 11:48:30 -03:00
Oswaldo Ferreira 00a273d3a9 Revert "Automatically update MR merge-ref along merge status" 2019-06-11 13:08:25 -03:00
Oswaldo Ferreira b965009ddd Automatically update MR merge-ref along merge status
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.
2019-05-31 19:16:01 -03:00
Rémy Coutable 98eb956cb0
Put some flaky specs in quarantine
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-04-24 19:02:02 +02:00
Oswaldo Ferreira ca884980ee [CE] Support multiple assignees for merge requests
Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161
(code out of ee/ folder).
2019-04-08 18:40:00 -03:00
Shinya Maeda a7d4824ded Check mergeability in merge to ref service
and add spec

Add changelog

ok

ok
2019-04-01 14:02:57 +07:00
Oswaldo Ferreira 2cb45dd0d5 Provide reliable source and target IDs
Returns the source and target IDs used to create
the merge commit on Gitaly.
2019-03-06 17:49:31 -03:00
Oswaldo Ferreira 959ad992b6 Ref merge does not fail upon FF config enabled 2019-03-06 10:53:55 -03:00
Oswaldo Ferreira 4e16edbe0a Add feature-flag support
Returns error in MergeToRefService when
merge_to_tmp_merge_ref_path ff is disabled.
2019-02-25 10:41:02 -03:00
Oswaldo Ferreira 105212ce49 Check authorization in merge services
Move authorization checks to merge services
instead relying solely on external checks.
2019-02-25 10:41:01 -03:00
Oswaldo Ferreira 1ad699677f Support merge to ref for merge-commit and squash
Adds the ground work for writing into
the merge ref refs/merge-requests/:iid/merge the
merge result between source and target branches of
a MR, without further side-effects such as
mailing, MR updates and target branch changes.
2019-02-25 10:40:58 -03:00