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/blame/commit_data_type.rb')
-rw-r--r--app/graphql/types/blame/commit_data_type.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/graphql/types/blame/commit_data_type.rb b/app/graphql/types/blame/commit_data_type.rb
new file mode 100644
index 00000000000..faac34b06f4
--- /dev/null
+++ b/app/graphql/types/blame/commit_data_type.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module Types
+ module Blame
+ # rubocop: disable Graphql/AuthorizeTypes
+ class CommitDataType < BaseObject
+ # This is presented through `Repository` that has its own authorization
+ graphql_name 'CommitData'
+
+ field :age_map_class, GraphQL::Types::String, null: false, description: 'CSS class for age of commit.'
+ field :author_avatar, GraphQL::Types::String, null: false, description: 'Link to author avatar.'
+ field :commit_author_link, GraphQL::Types::String, null: false, description: 'Link to the commit author.'
+ field :commit_link, GraphQL::Types::String, null: false, description: 'Link to the commit.'
+ field :project_blame_link, GraphQL::Types::String,
+ null: true, description: 'Link to blame prior to the change.'
+ field :time_ago_tooltip, GraphQL::Types::String, null: false, description: 'Time of commit.'
+ end
+ # rubocop: enable Graphql/AuthorizeTypes
+ end
+end