Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/blob.rb')
-rw-r--r--lib/api/entities/blob.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/api/entities/blob.rb b/lib/api/entities/blob.rb
index 12700d99865..b4206679ac9 100644
--- a/lib/api/entities/blob.rb
+++ b/lib/api/entities/blob.rb
@@ -15,6 +15,13 @@ module API
expose :ref
expose :startline
expose :project_id
+ expose :group_id, if: ->(object) { object.is_a?(Gitlab::Search::FoundWikiPage) }
+
+ private
+
+ def group_id
+ object.group&.id
+ end
end
end
end