summaryrefslogtreecommitdiff
path: root/app/serializers/diffs_entity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/diffs_entity.rb')
-rw-r--r--app/serializers/diffs_entity.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/diffs_entity.rb b/app/serializers/diffs_entity.rb
index 568d0f6aa8f..fb4fbe57130 100644
--- a/app/serializers/diffs_entity.rb
+++ b/app/serializers/diffs_entity.rb
@@ -11,6 +11,10 @@ class DiffsEntity < Grape::Entity
merge_request&.source_branch
end
+ expose :source_branch_exists do |diffs|
+ merge_request&.source_branch_exists?
+ end
+
expose :target_branch_name do |diffs|
merge_request&.target_branch
end