summaryrefslogtreecommitdiff
path: root/app/graphql/types/commit_type.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-31 12:06:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-31 12:06:26 +0000
commit0be510a49f6e4f8e27b19b707fd1dac61571f78f (patch)
tree97ca0053d4fad66e900d25fdba61b2adb611efb0 /app/graphql/types/commit_type.rb
parent6026bddcd51eca573c530240c421392045172b89 (diff)
downloadgitlab-ce-0be510a49f6e4f8e27b19b707fd1dac61571f78f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/types/commit_type.rb')
-rw-r--r--app/graphql/types/commit_type.rb30
1 files changed, 19 insertions, 11 deletions
diff --git a/app/graphql/types/commit_type.rb b/app/graphql/types/commit_type.rb
index fe71791f413..d5600881728 100644
--- a/app/graphql/types/commit_type.rb
+++ b/app/graphql/types/commit_type.rb
@@ -8,23 +8,31 @@ module Types
present_using CommitPresenter
- field :id, type: GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
- field :sha, type: GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
- field :title, type: GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions
- field :description, type: GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions
- field :message, type: GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions
- field :authored_date, type: Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
- field :web_url, type: GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
- field :signature_html, type: GraphQL::STRING_TYPE,
- null: true, calls_gitaly: true, description: 'Rendered html for the commit signature'
+ field :id, type: GraphQL::ID_TYPE, null: false,
+ description: 'ID (global ID) of the commit'
+ field :sha, type: GraphQL::STRING_TYPE, null: false,
+ description: 'SHA1 ID of the commit'
+ field :title, type: GraphQL::STRING_TYPE, null: true,
+ description: 'Title of the commit message'
+ field :description, type: GraphQL::STRING_TYPE, null: true,
+ description: 'Description of the commit message'
+ field :message, type: GraphQL::STRING_TYPE, null: true,
+ description: 'Raw commit message'
+ field :authored_date, type: Types::TimeType, null: true,
+ description: 'Timestamp of when the commit was authored'
+ field :web_url, type: GraphQL::STRING_TYPE, null: false,
+ description: 'Web URL of the commit'
+ field :signature_html, type: GraphQL::STRING_TYPE, null: true, calls_gitaly: true,
+ description: 'Rendered HTML of the commit signature'
# models/commit lazy loads the author by email
- field :author, type: Types::UserType, null: true # rubocop:disable Graphql/Descriptions
+ field :author, type: Types::UserType, null: true,
+ description: 'Author of the commit'
field :latest_pipeline,
type: Types::Ci::PipelineType,
null: true,
- description: "Latest pipeline for this commit",
+ description: "Latest pipeline of the commit",
resolve: -> (obj, ctx, args) do
Gitlab::Graphql::Loaders::PipelineForShaLoader.new(obj.project, obj.sha).find_last
end