Skip to content

Commit

Permalink
feat: add support for new public beta APIs for creating, reading, upd…
Browse files Browse the repository at this point in the history
…ating and deleting custom repo roles (`POST /orgs/{org}/custom_roles`, `PATCH /orgs/{org}/custom_roles/{role_id}`, `DELETE /orgs/{org}/custom_roles/{role_id}`, `GET /orgs/{org}/fine_grained_permissions`) (#455)

WIP octokit/openapi updated
  • Loading branch information
octokitbot authored Sep 7, 2022
1 parent 25ff4a2 commit b162e5d
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 17 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"description": "Shared TypeScript definitions for Octokit projects",
"dependencies": {
"@octokit/openapi-types": "^13.8.0"
"@octokit/openapi-types": "^13.9.0"
},
"scripts": {
"build": "pika-pack build",
Expand Down Expand Up @@ -96,7 +96,7 @@
]
},
"octokit": {
"openapi-version": "7.9.0"
"openapi-version": "7.10.0"
},
"renovate": {
"extends": [
Expand Down
70 changes: 65 additions & 5 deletions scripts/update-endpoints/generated/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -7815,6 +7815,25 @@
"previews": [],
"renamed": null
},
{
"method": "POST",
"url": "/orgs/{org}/custom_roles",
"documentationUrl": "https://docs.github.com/rest/reference/orgs#create-a-custom-role",
"parameters": [
{ "alias": null, "deprecated": null, "in": "PATH", "name": "org" },
{ "alias": null, "deprecated": null, "in": "BODY", "name": "name" },
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "description"
},
{ "alias": null, "deprecated": null, "in": "BODY", "name": "base_role" },
{ "alias": null, "deprecated": null, "in": "BODY", "name": "permissions" }
],
"previews": [],
"renamed": null
},
{
"method": "POST",
"url": "/orgs/{org}/invitations",
Expand Down Expand Up @@ -7874,6 +7893,17 @@
"previews": [],
"renamed": null
},
{
"method": "DELETE",
"url": "/orgs/{org}/custom_roles/{role_id}",
"documentationUrl": "https://docs.github.com/rest/reference/orgs#delete-a-custom-role",
"parameters": [
{ "alias": null, "deprecated": null, "in": "PATH", "name": "org" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "role_id" }
],
"previews": [],
"renamed": null
},
{
"method": "DELETE",
"url": "/orgs/{org}/hooks/{hook_id}",
Expand Down Expand Up @@ -8043,6 +8073,16 @@
"previews": [],
"renamed": null
},
{
"method": "GET",
"url": "/orgs/{org}/fine_grained_permissions",
"documentationUrl": "https://docs.github.com/rest/reference/orgs#list-fine-grained-permissions-for-an-organization",
"parameters": [
{ "alias": null, "deprecated": null, "in": "PATH", "name": "org" }
],
"previews": [],
"renamed": null
},
{
"method": "GET",
"url": "/user/orgs",
Expand Down Expand Up @@ -8470,6 +8510,26 @@
"previews": [],
"renamed": null
},
{
"method": "PATCH",
"url": "/orgs/{org}/custom_roles/{role_id}",
"documentationUrl": "https://docs.github.com/rest/reference/orgs#update-a-custom-role",
"parameters": [
{ "alias": null, "deprecated": null, "in": "PATH", "name": "org" },
{ "alias": null, "deprecated": null, "in": "PATH", "name": "role_id" },
{ "alias": null, "deprecated": null, "in": "BODY", "name": "name" },
{
"alias": null,
"deprecated": null,
"in": "BODY",
"name": "description"
},
{ "alias": null, "deprecated": null, "in": "BODY", "name": "base_role" },
{ "alias": null, "deprecated": null, "in": "BODY", "name": "permissions" }
],
"previews": [],
"renamed": null
},
{
"method": "PATCH",
"url": "/user/memberships/orgs/{org}",
Expand Down Expand Up @@ -8691,7 +8751,7 @@
{
"method": "GET",
"url": "/orgs/{org}/packages/{package_type}/{package_name}/versions",
"documentationUrl": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization",
"documentationUrl": "https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization",
"parameters": [
{
"alias": null,
Expand All @@ -8716,7 +8776,7 @@
{
"method": "GET",
"url": "/user/packages/{package_type}/{package_name}/versions",
"documentationUrl": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user",
"documentationUrl": "https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user",
"parameters": [
{
"alias": null,
Expand All @@ -8740,7 +8800,7 @@
{
"method": "GET",
"url": "/user/packages/{package_type}/{package_name}/versions",
"documentationUrl": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user",
"documentationUrl": "https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user",
"parameters": [
{
"alias": null,
Expand All @@ -8764,7 +8824,7 @@
{
"method": "GET",
"url": "/orgs/{org}/packages/{package_type}/{package_name}/versions",
"documentationUrl": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization",
"documentationUrl": "https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization",
"parameters": [
{
"alias": null,
Expand All @@ -8789,7 +8849,7 @@
{
"method": "GET",
"url": "/users/{username}/packages/{package_type}/{package_name}/versions",
"documentationUrl": "https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user",
"documentationUrl": "https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user",
"parameters": [
{
"alias": null,
Expand Down
34 changes: 31 additions & 3 deletions src/generated/Endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ export interface Endpoints {
"/orgs/{org}/credential-authorizations/{credential_id}",
"delete"
>;
/**
* @see https://docs.github.com/rest/reference/orgs#delete-a-custom-role
*/
"DELETE /orgs/{org}/custom_roles/{role_id}": Operation<
"/orgs/{org}/custom_roles/{role_id}",
"delete"
>;
/**
* @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret
*/
Expand Down Expand Up @@ -1701,6 +1708,13 @@ export interface Endpoints {
"/orgs/{org}/failed_invitations",
"get"
>;
/**
* @see https://docs.github.com/rest/reference/orgs#list-fine-grained-permissions-for-an-organization
*/
"GET /orgs/{org}/fine_grained_permissions": Operation<
"/orgs/{org}/fine_grained_permissions",
"get"
>;
/**
* @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks
*/
Expand Down Expand Up @@ -1828,7 +1842,7 @@ export interface Endpoints {
"get"
>;
/**
* @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization
* @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization
*/
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<
"/orgs/{org}/packages/{package_type}/{package_name}/versions",
Expand Down Expand Up @@ -3821,7 +3835,7 @@ export interface Endpoints {
"get"
>;
/**
* @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user
* @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user
*/
"GET /user/packages/{package_type}/{package_name}/versions": Operation<
"/user/packages/{package_type}/{package_name}/versions",
Expand Down Expand Up @@ -3974,7 +3988,7 @@ export interface Endpoints {
"get"
>;
/**
* @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user
* @see https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-a-user
*/
"GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<
"/users/{username}/packages/{package_type}/{package_name}/versions",
Expand Down Expand Up @@ -4105,6 +4119,13 @@ export interface Endpoints {
"/orgs/{org}/actions/runner-groups/{runner_group_id}",
"patch"
>;
/**
* @see https://docs.github.com/rest/reference/orgs#update-a-custom-role
*/
"PATCH /orgs/{org}/custom_roles/{role_id}": Operation<
"/orgs/{org}/custom_roles/{role_id}",
"patch"
>;
/**
* @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook
*/
Expand Down Expand Up @@ -4519,6 +4540,13 @@ export interface Endpoints {
"/orgs/{org}/actions/runners/{runner_id}/labels",
"post"
>;
/**
* @see https://docs.github.com/rest/reference/orgs#create-a-custom-role
*/
"POST /orgs/{org}/custom_roles": Operation<
"/orgs/{org}/custom_roles",
"post"
>;
/**
* @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook
*/
Expand Down

0 comments on commit b162e5d

Please sign in to comment.