diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-14 12:06:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-14 12:06:30 +0000 |
commit | d8c06be498acbfc2024c01b6b6b02d120dc499f2 (patch) | |
tree | 9e2e0852c45332d6222898676a2f6f096e600084 /app/graphql/types/commit_type.rb | |
parent | 2fa7d2ddf6a7004f89616e43b8279229af831e25 (diff) | |
download | gitlab-ce-d8c06be498acbfc2024c01b6b6b02d120dc499f2.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.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/graphql/types/commit_type.rb b/app/graphql/types/commit_type.rb index d5600881728..dcf4a2802c7 100644 --- a/app/graphql/types/commit_type.rb +++ b/app/graphql/types/commit_type.rb @@ -29,12 +29,16 @@ module Types field :author, type: Types::UserType, null: true, description: 'Author of the commit' + field :pipelines, Types::Ci::PipelineType.connection_type, + null: true, + description: 'Pipelines of the commit ordered latest first', + resolver: Resolvers::CommitPipelinesResolver + field :latest_pipeline, type: Types::Ci::PipelineType, null: true, description: "Latest pipeline of the commit", - resolve: -> (obj, ctx, args) do - Gitlab::Graphql::Loaders::PipelineForShaLoader.new(obj.project, obj.sha).find_last - end + deprecation_reason: 'use pipelines', + resolver: Resolvers::CommitPipelinesResolver.last end end |