issue_types
Creates, updates, deletes, gets or lists an issue_types resource.
Overview
| Name | issue_types |
| Type | Resource |
| Id | github.orgs.issue_types |
Fields
The following fields are returned by SELECT queries:
- list_issue_types
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | The unique identifier of the issue type. |
name | string | The name of the issue type. |
node_id | string | The node identifier of the issue type. |
color | string | The color of the issue type. (gray, blue, green, yellow, orange, red, pink, purple) |
created_at | string (date-time) | The time the issue type created. |
description | string | The description of the issue type. |
is_enabled | boolean | The enabled state of the issue type. |
updated_at | string (date-time) | The time the issue type last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_issue_types | select | org | Lists 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_type | insert | org, name, is_enabled | 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. | |
update_issue_type | replace | org, issue_type_id, name, is_enabled | 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. | |
delete_issue_type | delete | org, issue_type_id | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
issue_type_id | integer | The unique identifier of the issue type. |
org | string | The organization name. The name is not case sensitive. |
SELECT examples
- list_issue_types
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_issue_type
- Manifest
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
;
# Description fields are for documentation purposes
- name: issue_types
props:
- name: org
value: "{{ org }}"
description: Required parameter for the issue_types resource.
- name: name
value: "{{ name }}"
description: |
Name of the issue type.
- name: is_enabled
value: {{ is_enabled }}
description: |
Whether or not the issue type is enabled at the organization level.
- name: description
value: "{{ description }}"
description: |
Description of the issue type.
- name: color
value: "{{ color }}"
description: |
Color for the issue type.
valid_values: ['gray', 'blue', 'green', 'yellow', 'orange', 'red', 'pink', 'purple']
REPLACE examples
- update_issue_type
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
- delete_issue_type
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
;