Commit 88c26c77 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'jivanvl-add-namespace-monthly-usage-graphql-type' into 'master'

Add shared_runners_duration field to NamespaceMonthlyUsageType

See merge request gitlab-org/gitlab!74114
parents f5878cfc 56813743
......@@ -8704,6 +8704,7 @@ Represents the total number of issues and their weights for a particular day.
| <a id="ciminutesnamespacemonthlyusageminutes"></a>`minutes` | [`Int`](#int) | Total number of minutes used by all projects in the namespace. |
| <a id="ciminutesnamespacemonthlyusagemonth"></a>`month` | [`String`](#string) | Month related to the usage data. |
| <a id="ciminutesnamespacemonthlyusageprojects"></a>`projects` | [`CiMinutesProjectMonthlyUsageConnection`](#ciminutesprojectmonthlyusageconnection) | CI minutes usage data for projects in the namespace. (see [Connections](#connections)) |
| <a id="ciminutesnamespacemonthlyusagesharedrunnersduration"></a>`sharedRunnersDuration` | [`Int`](#int) | Total numbers of minutes used by the shared runners in the namespace. |
### `CiMinutesProjectMonthlyUsage`
......@@ -18,6 +18,9 @@ module Types
field :projects, ::Types::Ci::Minutes::ProjectMonthlyUsageType.connection_type, null: true,
description: 'CI minutes usage data for projects in the namespace.'
field :shared_runners_duration, ::GraphQL::INT_TYPE, null: true,
description: 'Total numbers of minutes used by the shared runners in the namespace.'
def month
object.date.strftime('%B')
end
......
......@@ -4,6 +4,6 @@ require 'spec_helper'
RSpec.describe GitlabSchema.types['CiMinutesNamespaceMonthlyUsage'] do
it do
expect(described_class).to have_graphql_fields(:minutes, :month, :projects)
expect(described_class).to have_graphql_fields(:minutes, :month, :projects, :shared_runners_duration)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment