issue_fields
Creates, updates, deletes, gets or lists an issue_fields resource.
Overview
| Name | issue_fields |
| Type | Resource |
| Id | github.orgs.issue_fields |
Fields
The following fields are returned by SELECT queries:
- list_issue_fields
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | The unique identifier of the issue field. |
name | string | The name of the issue field. |
node_id | string | The node identifier of the issue field. |
created_at | string (date-time) | The time the issue field was created. |
data_type | string | The data type of the issue field. (text, date, single_select, number) |
description | string | The description of the issue field. |
options | array | Available options for single select fields. |
updated_at | string (date-time) | The time the issue field was last updated. |
visibility | string | The visibility of the issue field. Can be organization_members_only (visible only within the organization) or all (visible to all users who can see issues). (organization_members_only, all) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_issue_fields | select | org | Lists all issue fields for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint. | |
create_issue_field | insert | org, name, data_type | Creates a new issue field for an organization. You can find out more about issue fields in Managing issue fields 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_field | update | org, issue_field_id | Updates an issue field for an organization. You can find out more about issue fields in Managing issue fields 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_field | delete | org, issue_field_id | Deletes an issue field for an organization. You can find out more about issue fields in Managing issue fields 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_field_id | integer | The unique identifier of the issue field. |
org | string | The organization name. The name is not case sensitive. |
SELECT examples
- list_issue_fields
Lists all issue fields 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,
created_at,
data_type,
description,
options,
updated_at,
visibility
FROM github.orgs.issue_fields
WHERE org = '{{ org }}' -- required
;
INSERT examples
- create_issue_field
- Manifest
Creates a new issue field for an organization.
You can find out more about issue fields in Managing issue fields 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_fields (
name,
description,
data_type,
visibility,
options,
org
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ data_type }}' /* required */,
'{{ visibility }}',
'{{ options }}',
'{{ org }}'
RETURNING
id,
name,
node_id,
created_at,
data_type,
description,
options,
updated_at,
visibility
;
# Description fields are for documentation purposes
- name: issue_fields
props:
- name: org
value: "{{ org }}"
description: Required parameter for the issue_fields resource.
- name: name
value: "{{ name }}"
description: |
Name of the issue field.
- name: description
value: "{{ description }}"
description: |
Description of the issue field.
- name: data_type
value: "{{ data_type }}"
description: |
The data type of the issue field.
valid_values: ['text', 'date', 'single_select', 'number']
- name: visibility
value: "{{ visibility }}"
description: |
The visibility of the issue field. Can be `organization_members_only` (visible only within the organization) or `all` (visible to all users who can see issues). Only used when the visibility settings feature is enabled. Defaults to `organization_members_only`.
valid_values: ['organization_members_only', 'all']
- name: options
description: |
Options for single select fields. Required when data_type is 'single_select'.
value:
- name: "{{ name }}"
description: "{{ description }}"
color: "{{ color }}"
priority: {{ priority }}
UPDATE examples
- update_issue_field
Updates an issue field for an organization.
You can find out more about issue fields in Managing issue fields 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 github.orgs.issue_fields
SET
name = '{{ name }}',
description = '{{ description }}',
visibility = '{{ visibility }}',
options = '{{ options }}'
WHERE
org = '{{ org }}' --required
AND issue_field_id = '{{ issue_field_id }}' --required
RETURNING
id,
name,
node_id,
created_at,
data_type,
description,
options,
updated_at,
visibility;
DELETE examples
- delete_issue_field
Deletes an issue field for an organization.
You can find out more about issue fields in Managing issue fields 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_fields
WHERE org = '{{ org }}' --required
AND issue_field_id = '{{ issue_field_id }}' --required
;