Skip to main content

issue_types

Creates, updates, deletes, gets or lists an issue_types resource.

Overview

Nameissue_types
TypeResource
Idgithub.orgs.issue_types

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idintegerThe unique identifier of the issue type.
namestringThe name of the issue type.
node_idstringThe node identifier of the issue type.
colorstringThe color of the issue type. (gray, blue, green, yellow, orange, red, pink, purple)
created_atstring (date-time)The time the issue type created.
descriptionstringThe description of the issue type.
is_enabledbooleanThe enabled state of the issue type.
updated_atstring (date-time)The time the issue type last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_issue_typesselectorgLists all issue types for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
create_issue_typeinsertorg, name, is_enabledCreate a new issue type for an organization.

You can find out more about issue types in Managing issue types in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.
update_issue_typereplaceorg, issue_type_id, name, is_enabledUpdates an issue type for an organization.

You can find out more about issue types in Managing issue types in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.
delete_issue_typedeleteorg, issue_type_idDeletes an issue type for an organization.

You can find out more about issue types in Managing issue types in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
issue_type_idintegerThe unique identifier of the issue type.
orgstringThe organization name. The name is not case sensitive.

SELECT examples

Lists all issue types for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

SELECT
id,
name,
node_id,
color,
created_at,
description,
is_enabled,
updated_at
FROM github.orgs.issue_types
WHERE org = '{{ org }}' -- required
;

INSERT examples

Create a new issue type for an organization.

You can find out more about issue types in Managing issue types in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.

INSERT INTO github.orgs.issue_types (
name,
is_enabled,
description,
color,
org
)
SELECT
'{{ name }}' /* required */,
{{ is_enabled }} /* required */,
'{{ description }}',
'{{ color }}',
'{{ org }}'
RETURNING
id,
name,
node_id,
color,
created_at,
description,
is_enabled,
updated_at
;

REPLACE examples

Updates an issue type for an organization.

You can find out more about issue types in Managing issue types in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.

REPLACE github.orgs.issue_types
SET
name = '{{ name }}',
is_enabled = {{ is_enabled }},
description = '{{ description }}',
color = '{{ color }}'
WHERE
org = '{{ org }}' --required
AND issue_type_id = '{{ issue_type_id }}' --required
AND name = '{{ name }}' --required
AND is_enabled = {{ is_enabled }} --required
RETURNING
id,
name,
node_id,
color,
created_at,
description,
is_enabled,
updated_at;

DELETE examples

Deletes an issue type for an organization.

You can find out more about issue types in Managing issue types in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
personal access tokens (classic) need the admin:org scope to use this endpoint.

DELETE FROM github.orgs.issue_types
WHERE org = '{{ org }}' --required
AND issue_type_id = '{{ issue_type_id }}' --required
;