Commit graph

16 commits

Author SHA1 Message Date
GitLab Bot
87911fabb2 Add latest changes from gitlab-org/gitlab@master 2020-12-11 21:10:13 +00:00
GitLab Bot
2948e306c0 Add latest changes from gitlab-org/gitlab@master 2020-07-24 18:09:45 +00:00
GitLab Bot
ae1efa2e1d Add latest changes from gitlab-org/gitlab@master 2020-07-01 15:08:45 +00:00
GitLab Bot
ebe92e84a9 Add latest changes from gitlab-org/gitlab@master 2020-06-26 18:09:03 +00:00
GitLab Bot
65f5f75e3a Add latest changes from gitlab-org/gitlab@master 2020-06-25 15:08:37 +00:00
GitLab Bot
6b833f1e03 Add latest changes from gitlab-org/gitlab@master 2020-02-04 15:08:40 +00:00
GitLab Bot
427b23c127 Add latest changes from gitlab-org/gitlab@master 2019-10-03 00:05:59 +00:00
GitLab Bot
538fff823d Add latest changes from gitlab-org/gitlab@master 2019-09-30 15:08:09 +00:00
Igor
351b39f172 Backport splitting approval changes from CE
Author and committers approvals are split in EE
This commit provides backports for those changes

This reverts commit 886f00bcba.
2019-04-02 11:01:07 +00:00
Luke Duncalfe
23a462879f Handle blank projects in CommitCollection#enrich!
A project is needed in order to fetch data from gitaly. Projects can be
absent from commits in certain rare situations (like when viewing a MR
of a deleted fork). In these cases, assume that the enriched data is not
needed.

See this comment:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26144#note_152191106

"It's led to a dilemma about where to "fix" this in code. I'm going
to fix it by allowing CommitCollection#enrich! to just return unenriched
commits when a project is missing, essentially "silently failing". I
hope this is the right decision. It's going with the assumption that
calls in these situations in the future are not needing the full data.
The alternative would be to allow CommitCollection#enrich! to still
error, but handle it in the methods that call #enrich!, however that
might lead to brittleness in future when working with project-less MRs."
2019-03-22 10:26:16 +13:00
Luke Duncalfe
38bf176c3c Enrich commits with full data in CommitCollection
Allow incomplete commit records to load their full data from gitaly.

Commits can be based on a Hash of data retrieved from PostgreSQL, and
this data can be intentionally incomplete in order to save space.

A new method #gitaly? has been added to Gitlab::Git::Commit, which
returns true if the underlying data source of the Commit is a
Gitaly::GitCommit.

CommitCollection now has a method #enrich which replaces non-gitaly
commits in place with commits from gitaly.

CommitCollection#without_merge_commits has been updated to call this
method, as in order to determine a merge commit we need to have parent
data.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58805
2019-03-22 10:26:15 +13:00
Stan Hu
886f00bcba Backport commit author changes from CE
This backports the changes made in EE to fix merge request approvers
from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9574.
2019-02-15 05:58:23 -08:00
Luke Duncalfe
2b7dd017af Allow custom squash commit messages 2019-02-06 12:33:11 +00:00
Tiago Botelho
a2842241d4
Add committers and authors methods on MergeRequest
These are used by the EE-only approvers feature
2019-01-08 00:27:29 +01:00
Francisco Javier López
a6778fc647 Rename project's pipelines relation 2018-12-05 14:39:15 +00:00
Yorick Peterse
ab16a6fb34
Optimise getting the pipeline status of commits
This adds an optimised way of getting the latest pipeline status for a
list of Commit objects (or just a single one).
2017-11-16 16:01:14 +01:00