diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2017-12-20 10:01:21 +0100 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-01-05 09:34:59 +0100 |
commit | 27a75ea1757d1c1b67bf501ec333221ed5e92d04 (patch) | |
tree | 4ef9caa88a19ed27cc58d60e42769a2fe5cf1e8d /app/serializers | |
parent | 1560c234d2410ccbd163b9aedecf2d8b7a596627 (diff) | |
download | gitlab-ce-27a75ea1757d1c1b67bf501ec333221ed5e92d04.tar.gz |
Backport 'Rebase' feature from EE to CEjprovazn-rebase
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
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/merge_request_basic_entity.rb | 1 | ||||
-rw-r--r-- | app/serializers/merge_request_widget_entity.rb | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/serializers/merge_request_basic_entity.rb b/app/serializers/merge_request_basic_entity.rb index d54a6516aed..e4aec977f01 100644 --- a/app/serializers/merge_request_basic_entity.rb +++ b/app/serializers/merge_request_basic_entity.rb @@ -4,4 +4,5 @@ class MergeRequestBasicEntity < IssuableSidebarEntity expose :merge_error expose :state expose :source_branch_exists?, as: :source_branch_exists + expose :rebase_in_progress?, as: :rebase_in_progress end diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb index e905e6876c2..48cd2317f46 100644 --- a/app/serializers/merge_request_widget_entity.rb +++ b/app/serializers/merge_request_widget_entity.rb @@ -23,6 +23,16 @@ class MergeRequestWidgetEntity < IssuableEntity MergeRequestMetricsEntity.new(metrics).as_json end + expose :rebase_commit_sha + expose :rebase_in_progress?, as: :rebase_in_progress + + expose :can_push_to_source_branch do |merge_request| + presenter(merge_request).can_push_to_source_branch? + end + expose :rebase_path do |merge_request| + presenter(merge_request).rebase_path + end + # User entities expose :merge_user, using: UserEntity |