2019-11-14 07:06:30 -05:00
|
|
|
# frozen_string_literal: true
|
2020-11-17 13:09:20 -05:00
|
|
|
# rubocop: disable Graphql/ResolverType
|
2019-11-14 07:06:30 -05:00
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class CommitPipelinesResolver < BaseResolver
|
2020-11-17 13:09:20 -05:00
|
|
|
# The GraphQL type here gets defined in this include
|
2019-11-14 07:06:30 -05:00
|
|
|
include ::ResolvesPipelines
|
|
|
|
|
|
|
|
alias_method :commit, :object
|
|
|
|
|
|
|
|
def resolve(**args)
|
|
|
|
resolve_pipelines(commit.project, args.merge!({ sha: commit.sha }))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2020-11-17 13:09:20 -05:00
|
|
|
# rubocop: enable Graphql/ResolverType
|