diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-30 21:09:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-30 21:09:13 +0300 |
commit | 79040c61789cf767f8a232b1b9ecc0dc557d76cb (patch) | |
tree | dc7af3a9eca1d5503622b32a0783a0cba8f94c76 /app/serializers | |
parent | 340f15b402eec795fca0e0f29709baef0ecf14a7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/merge_request_poll_cached_widget_entity.rb | 12 | ||||
-rw-r--r-- | app/serializers/merge_request_poll_widget_entity.rb | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/app/serializers/merge_request_poll_cached_widget_entity.rb b/app/serializers/merge_request_poll_cached_widget_entity.rb index 72f629b3507..23266bfed7a 100644 --- a/app/serializers/merge_request_poll_cached_widget_entity.rb +++ b/app/serializers/merge_request_poll_cached_widget_entity.rb @@ -74,6 +74,18 @@ class MergeRequestPollCachedWidgetEntity < IssuableEntity diffs_project_merge_request_path(merge_request.project, merge_request) end + expose :squash_enabled_by_default do |merge_request| + presenter(merge_request).project.squash_enabled_by_default? + end + + expose :squash_readonly do |merge_request| + presenter(merge_request).project.squash_readonly? + end + + expose :squash_on_merge do |merge_request| + presenter(merge_request).squash_on_merge? + end + private delegate :current_user, to: :request diff --git a/app/serializers/merge_request_poll_widget_entity.rb b/app/serializers/merge_request_poll_widget_entity.rb index aad607f358a..b0d311681c0 100644 --- a/app/serializers/merge_request_poll_widget_entity.rb +++ b/app/serializers/merge_request_poll_widget_entity.rb @@ -145,6 +145,18 @@ class MergeRequestPollWidgetEntity < Grape::Entity presenter(merge_request).revert_in_fork_path end + expose :squash_enabled_by_default do |merge_request| + presenter(merge_request).project.squash_enabled_by_default? + end + + expose :squash_readonly do |merge_request| + presenter(merge_request).project.squash_readonly? + end + + expose :squash_on_merge do |merge_request| + presenter(merge_request).squash_on_merge? + end + private delegate :current_user, to: :request |