Commit c75bbec1 authored by Sean Arnold's avatar Sean Arnold

Rename on-call user type to participant

Add to schedule
Update docs
parent 5714cc34
......@@ -10960,6 +10960,11 @@ An ISO 8601-encoded date
"""
scalar ISO8601Date
"""
Identifier of IncidentManagement::OncallParticipant
"""
scalar IncidentManagementOncallParticipantID
"""
Describes an incident management on-call rotation
"""
......@@ -11007,7 +11012,7 @@ type IncidentManagementOncallRotation {
Returns the last _n_ elements from the list.
"""
last: Int
): OncallUserTypeConnection
): OncallParticipantTypeConnection
"""
Start date of the on-call rotation
......@@ -11015,6 +11020,41 @@ type IncidentManagementOncallRotation {
startsAt: Time
}
"""
The connection type for IncidentManagementOncallRotation.
"""
type IncidentManagementOncallRotationConnection {
"""
A list of edges.
"""
edges: [IncidentManagementOncallRotationEdge]
"""
A list of nodes.
"""
nodes: [IncidentManagementOncallRotation]
"""
Information to aid in pagination.
"""
pageInfo: PageInfo!
}
"""
An edge in a connection.
"""
type IncidentManagementOncallRotationEdge {
"""
A cursor for use in pagination.
"""
cursor: String!
"""
The item at the end of the edge.
"""
node: IncidentManagementOncallRotation
}
"""
Identifier of IncidentManagement::OncallRotation
"""
......@@ -11039,6 +11079,31 @@ type IncidentManagementOncallSchedule {
"""
name: String!
"""
On-call rotations for the on-call schedule
"""
oncallRotations(
"""
Returns the elements in the list that come after the specified cursor.
"""
after: String
"""
Returns the elements in the list that come before the specified cursor.
"""
before: String
"""
Returns the first _n_ elements from the list.
"""
first: Int
"""
Returns the last _n_ elements from the list.
"""
last: Int
): IncidentManagementOncallRotationConnection!
"""
Time zone of the on-call schedule
"""
......@@ -15555,6 +15620,66 @@ Identifier of Noteable
"""
scalar NoteableID
"""
The rotation participant and color palette
"""
type OncallParticipantType {
"""
The color palette to assign to the on-call user. For example "blue".
"""
colorPalette: String
"""
The color weight to assign to for the on-call user, for example "500". Max 4 chars. For easy identification of the user.
"""
colorWeight: String
"""
ID of the on-call participant
"""
id: IncidentManagementOncallParticipantID!
"""
The user who is participating
"""
user: User!
}
"""
The connection type for OncallParticipantType.
"""
type OncallParticipantTypeConnection {
"""
A list of edges.
"""
edges: [OncallParticipantTypeEdge]
"""
A list of nodes.
"""
nodes: [OncallParticipantType]
"""
Information to aid in pagination.
"""
pageInfo: PageInfo!
}
"""
An edge in a connection.
"""
type OncallParticipantTypeEdge {
"""
A cursor for use in pagination.
"""
cursor: String!
"""
The item at the end of the edge.
"""
node: OncallParticipantType
}
"""
Autogenerated input type of OncallRotationCreate
"""
......@@ -15830,61 +15955,6 @@ input OncallUserInputType {
username: String!
}
"""
The rotation user and color palette
"""
type OncallUserType {
"""
The color palette to assign to the on-call user. For example "blue".
"""
colorPalette: String
"""
The color weight to assign to for the on-call user, for example "500". Max 4 chars. For easy identification of the user.
"""
colorWeight: String
"""
The user who is participating
"""
user: User!
}
"""
The connection type for OncallUserType.
"""
type OncallUserTypeConnection {
"""
A list of edges.
"""
edges: [OncallUserTypeEdge]
"""
A list of nodes.
"""
nodes: [OncallUserType]
"""
Information to aid in pagination.
"""
pageInfo: PageInfo!
}
"""
An edge in a connection.
"""
type OncallUserTypeEdge {
"""
A cursor for use in pagination.
"""
cursor: String!
"""
The item at the end of the edge.
"""
node: OncallUserType
}
"""
Represents a package
"""
......
......@@ -30033,6 +30033,16 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "IncidentManagementOncallParticipantID",
"description": "Identifier of IncidentManagement::OncallParticipant",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "IncidentManagementOncallRotation",
......@@ -30149,7 +30159,7 @@
],
"type": {
"kind": "OBJECT",
"name": "OncallUserTypeConnection",
"name": "OncallParticipantTypeConnection",
"ofType": null
},
"isDeprecated": false,
......@@ -30177,6 +30187,118 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "IncidentManagementOncallRotationConnection",
"description": "The connection type for IncidentManagementOncallRotation.",
"fields": [
{
"name": "edges",
"description": "A list of edges.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "IncidentManagementOncallRotationEdge",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "nodes",
"description": "A list of nodes.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "IncidentManagementOncallRotation",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pageInfo",
"description": "Information to aid in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "PageInfo",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "IncidentManagementOncallRotationEdge",
"description": "An edge in a connection.",
"fields": [
{
"name": "cursor",
"description": "A cursor for use in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "node",
"description": "The item at the end of the edge.",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "IncidentManagementOncallRotation",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "IncidentManagementOncallRotationID",
......@@ -30242,6 +30364,63 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "oncallRotations",
"description": "On-call rotations for the on-call schedule",
"args": [
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "before",
"description": "Returns the elements in the list that come before the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "first",
"description": "Returns the first _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "last",
"description": "Returns the last _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "IncidentManagementOncallRotationConnection",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "timezone",
"description": "Time zone of the on-call schedule",
......@@ -46232,6 +46411,195 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "OncallParticipantType",
"description": "The rotation participant and color palette",
"fields": [
{
"name": "colorPalette",
"description": "The color palette to assign to the on-call user. For example \"blue\".",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "colorWeight",
"description": "The color weight to assign to for the on-call user, for example \"500\". Max 4 chars. For easy identification of the user.",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "id",
"description": "ID of the on-call participant",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "IncidentManagementOncallParticipantID",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "user",
"description": "The user who is participating",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "User",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "OncallParticipantTypeConnection",
"description": "The connection type for OncallParticipantType.",
"fields": [
{
"name": "edges",
"description": "A list of edges.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "OncallParticipantTypeEdge",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "nodes",
"description": "A list of nodes.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "OncallParticipantType",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pageInfo",
"description": "Information to aid in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "PageInfo",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "OncallParticipantTypeEdge",
"description": "An edge in a connection.",
"fields": [
{
"name": "cursor",
"description": "A cursor for use in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "node",
"description": "The item at the end of the edge.",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "OncallParticipantType",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "OncallRotationCreateInput",
......@@ -46966,177 +47334,6 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "OncallUserType",
"description": "The rotation user and color palette",
"fields": [
{
"name": "colorPalette",
"description": "The color palette to assign to the on-call user. For example \"blue\".",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "colorWeight",
"description": "The color weight to assign to for the on-call user, for example \"500\". Max 4 chars. For easy identification of the user.",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "user",
"description": "The user who is participating",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "User",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "OncallUserTypeConnection",
"description": "The connection type for OncallUserType.",
"fields": [
{
"name": "edges",
"description": "A list of edges.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "OncallUserTypeEdge",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "nodes",
"description": "A list of nodes.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "OncallUserType",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pageInfo",
"description": "Information to aid in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "PageInfo",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "OncallUserTypeEdge",
"description": "An edge in a connection.",
"fields": [
{
"name": "cursor",
"description": "A cursor for use in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "node",
"description": "The item at the end of the edge.",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "OncallUserType",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "Package",
......@@ -1722,7 +1722,7 @@ Describes an incident management on-call rotation.
| `length` | Int | Time zone of the on-call schedule |
| `lengthUnit` | OncallRotationUnitEnum | Unit of the on-call rotation length |
| `name` | String! | Name of the on-call rotation |
| `participants` | OncallUserTypeConnection | Participants of the on-call rotation |
| `participants` | OncallParticipantTypeConnection | Participants of the on-call rotation |
| `startsAt` | Time | Start date of the on-call rotation |
### IncidentManagementOncallSchedule
......@@ -1734,6 +1734,7 @@ Describes an incident management on-call schedule.
| `description` | String | Description of the on-call schedule |
| `iid` | ID! | Internal ID of the on-call schedule |
| `name` | String! | Name of the on-call schedule |
| `oncallRotations` | IncidentManagementOncallRotationConnection! | On-call rotations for the on-call schedule |
| `timezone` | String! | Time zone of the on-call schedule |
### InstanceSecurityDashboard
......@@ -2390,6 +2391,17 @@ Autogenerated return type of NamespaceIncreaseStorageTemporarily.
| `repositionNote` | Boolean! | Indicates the user can perform `reposition_note` on this resource |
| `resolveNote` | Boolean! | Indicates the user can perform `resolve_note` on this resource |
### OncallParticipantType
The rotation participant and color palette.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `colorPalette` | String | The color palette to assign to the on-call user. For example "blue". |
| `colorWeight` | String | The color weight to assign to for the on-call user, for example "500". Max 4 chars. For easy identification of the user. |
| `id` | IncidentManagementOncallParticipantID! | ID of the on-call participant |
| `user` | User! | The user who is participating |
### OncallRotationCreatePayload
Autogenerated return type of OncallRotationCreate.
......@@ -2430,16 +2442,6 @@ Autogenerated return type of OncallScheduleUpdate.
| `errors` | String! => Array | Errors encountered during execution of the mutation. |
| `oncallSchedule` | IncidentManagementOncallSchedule | The on-call schedule |
### OncallUserType
The rotation user and color palette.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `colorPalette` | String | The color palette to assign to the on-call user. For example "blue". |
| `colorWeight` | String | The color weight to assign to for the on-call user, for example "500". Max 4 chars. For easy identification of the user. |
| `user` | User! | The user who is participating |
### Package
Represents a package.
......
......@@ -3,9 +3,14 @@
module Types
module IncidentManagement
# rubocop: disable Graphql/AuthorizeTypes
class OncallUserType < BaseObject
graphql_name 'OncallUserType'
description 'The rotation user and color palette'
class OncallParticipantType < BaseObject
graphql_name 'OncallParticipantType'
description 'The rotation participant and color palette'
field :id,
Types::GlobalIDType[::IncidentManagement::OncallParticipant],
null: false,
description: 'ID of the on-call participant'
field :user, Types::UserType,
null: false,
......
......@@ -34,7 +34,7 @@ module Types
description: 'Unit of the on-call rotation length'
field :participants,
::Types::IncidentManagement::OncallUserType.connection_type,
::Types::IncidentManagement::OncallParticipantType.connection_type,
null: true,
description: 'Participants of the on-call rotation'
......
......@@ -27,6 +27,12 @@ module Types
GraphQL::STRING_TYPE,
null: false,
description: 'Time zone of the on-call schedule'
field :oncall_rotations,
OncallRotationType.connection_type,
null: false,
description: 'On-call rotations for the on-call schedule'
end
end
end
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe GitlabSchema.types['OncallParticipantType'] do
specify { expect(described_class.graphql_name).to eq('OncallParticipantType') }
it 'exposes the expected fields' do
expected_fields = %i[
id
user
color_palette
color_weight
]
expect(described_class).to have_graphql_fields(*expected_fields)
end
end
......@@ -13,6 +13,7 @@ RSpec.describe GitlabSchema.types['IncidentManagementOncallSchedule'] do
name
description
timezone
oncall_rotations
]
expect(described_class).to have_graphql_fields(*expected_fields)
......
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