Skip to content

Commit 58d342e

Browse files
authored
feat: new /orgs/{org}/issue-types, /orgs/{org}/issue-types/{issue_type_id} enpoints (#792)
* WIP octokit/openapi updated * WIP octokit/openapi updated
1 parent b3fe977 commit 58d342e

24 files changed

+809
-24
lines changed

docs/apps/createInstallationAccessToken.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The level of permission to grant the access token for repository contents, commi
8080
</td></tr>
8181
<tr><td>permissions.dependabot_secrets</td><td>no</td><td>
8282

83-
The leve of permission to grant the access token to manage Dependabot secrets.
83+
The level of permission to grant the access token to manage Dependabot secrets.
8484

8585
</td></tr>
8686
<tr><td>permissions.deployments</td><td>no</td><td>

docs/apps/scopeToken.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The level of permission to grant the access token for repository contents, commi
9494
</td></tr>
9595
<tr><td>permissions.dependabot_secrets</td><td>no</td><td>
9696

97-
The leve of permission to grant the access token to manage Dependabot secrets.
97+
The level of permission to grant the access token to manage Dependabot secrets.
9898

9999
</td></tr>
100100
<tr><td>permissions.deployments</td><td>no</td><td>

docs/codespaces/createOrUpdateRepoSecret.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type: API method
1111
Creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using
1212
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
1313

14-
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
14+
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin.
1515

1616
```js
1717
octokit.rest.codespaces.createOrUpdateRepoSecret({

docs/codespaces/deleteRepoSecret.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type: API method
1010

1111
Deletes a development environment secret in a repository using the secret name.
1212

13-
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
13+
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin.
1414

1515
```js
1616
octokit.rest.codespaces.deleteRepoSecret({

docs/issues/create.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ Labels to associate with this issue. _NOTE: Only users with push access can set
7676

7777
Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._
7878

79+
</td></tr>
80+
<tr><td>type</td><td>no</td><td>
81+
82+
The name of the issue type to associate with this issue.
83+
7984
</td></tr>
8085
</tbody>
8186
</table>

docs/issues/listForOrg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Indicates the state of the issues to return.
5656

5757
A list of comma separated label names. Example: `bug,ui,@high`
5858

59+
</td></tr>
60+
<tr><td>type</td><td>no</td><td>
61+
62+
Can be the name of an issue type.
63+
5964
</td></tr>
6065
<tr><td>sort</td><td>no</td><td>
6166

docs/issues/listForRepo.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ Indicates the state of the issues to return.
6262

6363
Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user.
6464

65+
</td></tr>
66+
<tr><td>type</td><td>no</td><td>
67+
68+
Can be the name of an issue type. If the string `*` is passed, issues with any type are accepted. If the string `none` is passed, issues without type are returned.
69+
6570
</td></tr>
6671
<tr><td>creator</td><td>no</td><td>
6772

docs/issues/update.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ Labels to associate with this issue. Pass one or more labels to _replace_ the se
8888

8989
Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped.
9090

91+
</td></tr>
92+
<tr><td>type</td><td>no</td><td>
93+
94+
The name of the issue type to associate with this issue or use `null` to remove the current issue type.
95+
9196
</td></tr>
9297
</tbody>
9398
</table>

docs/orgs/createIssueType.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: Create issue type for an organization
3+
example: octokit.rest.orgs.createIssueType({ org, name, is_enabled })
4+
route: POST /orgs/{org}/issue-types
5+
scope: orgs
6+
type: API method
7+
---
8+
9+
# Create issue type for an organization
10+
11+
Create a new issue type for an organization.
12+
13+
You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).
14+
15+
```js
16+
octokit.rest.orgs.createIssueType({
17+
org,
18+
name,
19+
is_enabled,
20+
});
21+
```
22+
23+
## Parameters
24+
25+
<table>
26+
<thead>
27+
<tr>
28+
<th>name</th>
29+
<th>required</th>
30+
<th>description</th>
31+
</tr>
32+
</thead>
33+
<tbody>
34+
<tr><td>org</td><td>yes</td><td>
35+
36+
The organization name. The name is not case sensitive.
37+
38+
</td></tr>
39+
<tr><td>name</td><td>yes</td><td>
40+
41+
Name of the issue type.
42+
43+
</td></tr>
44+
<tr><td>is_enabled</td><td>yes</td><td>
45+
46+
Whether or not the issue type is enabled at the organization level.
47+
48+
</td></tr>
49+
<tr><td>is_private</td><td>no</td><td>
50+
51+
Whether or not the issue type is restricted to issues in private repositories.
52+
53+
</td></tr>
54+
<tr><td>description</td><td>no</td><td>
55+
56+
Description of the issue type.
57+
58+
</td></tr>
59+
<tr><td>color</td><td>no</td><td>
60+
61+
Color for the issue type.
62+
63+
</td></tr>
64+
</tbody>
65+
</table>
66+
67+
See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/orgs/issue-types#create-issue-type-for-an-organization).

docs/orgs/createOrUpdateCustomProperties.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ type: API method
1010

1111
Creates new or updates existing custom properties defined for an organization in a batch.
1212

13+
If the property already exists, the existing property will be replaced with the new values.
14+
Missing optional values will fall back to default values, previous values will be overwritten.
15+
E.g. if a property exists with `values_editable_by: org_and_repo_actors` and it's updated without specifying `values_editable_by`, it will be updated to default value `org_actors`.
16+
1317
To use this endpoint, the authenticated user must be one of:
1418

1519
- An administrator for the organization.

0 commit comments

Comments
 (0)