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 'app/graphql/types/projects/fork_details_type.rb')
-rw-r--r--app/graphql/types/projects/fork_details_type.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/graphql/types/projects/fork_details_type.rb b/app/graphql/types/projects/fork_details_type.rb
new file mode 100644
index 00000000000..88c17d89620
--- /dev/null
+++ b/app/graphql/types/projects/fork_details_type.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module Types
+ module Projects
+ # rubocop: disable Graphql/AuthorizeTypes
+ class ForkDetailsType < BaseObject
+ graphql_name 'ForkDetails'
+ description 'Details of the fork project compared to its upstream project.'
+
+ field :ahead, GraphQL::Types::Int,
+ null: true,
+ description: 'Number of commits ahead of upstream.'
+
+ field :behind, GraphQL::Types::Int,
+ null: true,
+ description: 'Number of commits behind upstream.'
+ end
+ # rubocop: enable Graphql/AuthorizeTypes
+ end
+end