debian-mirror-gitlab/app/graphql/resolvers/ci/project_pipeline_counts_resolver.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
806 B
Ruby
Raw Normal View History

2022-04-04 11:22:00 +05:30
# frozen_string_literal: true
module Resolvers
module Ci
class ProjectPipelineCountsResolver < BaseResolver
type Types::Ci::PipelineCountsType, null: true
argument :ref,
GraphQL::Types::String,
required: false,
description: "Filter pipelines by the ref they are run for."
argument :sha,
GraphQL::Types::String,
required: false,
description: "Filter pipelines by the SHA of the commit they are run for."
argument :source,
GraphQL::Types::String,
required: false,
description: "Filter pipelines by their source."
def resolve(**args)
::Gitlab::PipelineScopeCounts.new(context[:current_user], object, args)
end
end
end
end