Skip to content

Commit

Permalink
feat: order parameter for GET /enterprises/{enterprise}/audit-log
Browse files Browse the repository at this point in the history
… and `GET /orgs/{org}/audit-log` operations (#38)
  • Loading branch information
octokitbot committed Jan 31, 2021
1 parent 5934e27 commit 52bf6e3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
15 changes: 12 additions & 3 deletions cache/openapi-schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi": "3.0.3",
"info": {
"version": "2.6.0",
"version": "2.7.0",
"title": "GitHub's official OpenAPI spec + Octokit extension",
"description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
"license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" },
Expand Down Expand Up @@ -2963,7 +2963,7 @@
"/enterprises/{enterprise}/audit-log": {
"get": {
"summary": "Get the audit log for an enterprise",
"description": "**Note:** The audit log REST API is currently in beta and is subject to change. To join the beta, talk to your services or sales contact at GitHub.\n\nGets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope.",
"description": "**Note:** The audit log REST API is currently in beta and is subject to change.\n\nGets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope.",
"operationId": "audit-log/get-audit-log",
"tags": ["audit-log"],
"externalDocs": {
Expand All @@ -2976,6 +2976,7 @@
{ "$ref": "#/components/parameters/audit-log-include" },
{ "$ref": "#/components/parameters/audit-log-after" },
{ "$ref": "#/components/parameters/audit-log-before" },
{ "$ref": "#/components/parameters/audit-log-order" },
{ "$ref": "#/components/parameters/per_page" }
],
"responses": {
Expand Down Expand Up @@ -6925,7 +6926,7 @@
"/orgs/{org}/audit-log": {
"get": {
"summary": "Get the audit log for an organization",
"description": "**Note:** The audit log REST API is currently in beta and is subject to change. To join the beta, talk to your services or sales contact at GitHub.\n\nGets the audit log for an organization. For more information, see \"[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization).\"\n\nTo use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint.",
"description": "**Note:** The audit log REST API is currently in beta and is subject to change.\n\nGets the audit log for an organization. For more information, see \"[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization).\"\n\nTo use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint.",
"operationId": "orgs/get-audit-log",
"tags": ["orgs"],
"externalDocs": {
Expand All @@ -6938,6 +6939,7 @@
{ "$ref": "#/components/parameters/audit-log-include" },
{ "$ref": "#/components/parameters/audit-log-after" },
{ "$ref": "#/components/parameters/audit-log-before" },
{ "$ref": "#/components/parameters/audit-log-order" },
{ "$ref": "#/components/parameters/per_page" }
],
"responses": {
Expand Down Expand Up @@ -67082,6 +67084,13 @@
"required": false,
"schema": { "type": "string" }
},
"audit-log-order": {
"name": "order",
"description": "The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.\n\nThe default is `desc`.",
"in": "query",
"required": false,
"schema": { "type": "string", "enum": ["desc", "asc"] }
},
"gist_id": {
"name": "gist_id",
"description": "gist_id parameter",
Expand Down
26 changes: 22 additions & 4 deletions generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export interface paths {
};
"/enterprises/{enterprise}/audit-log": {
/**
* **Note:** The audit log REST API is currently in beta and is subject to change. To join the beta, talk to your services or sales contact at GitHub.
* **Note:** The audit log REST API is currently in beta and is subject to change.
*
* Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope.
*/
Expand Down Expand Up @@ -1079,7 +1079,7 @@ export interface paths {
};
"/orgs/{org}/audit-log": {
/**
* **Note:** The audit log REST API is currently in beta and is subject to change. To join the beta, talk to your services or sales contact at GitHub.
* **Note:** The audit log REST API is currently in beta and is subject to change.
*
* Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."
*
Expand Down Expand Up @@ -9461,6 +9461,12 @@ export interface components {
"audit-log-after": string;
/** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */
"audit-log-before": string;
/**
* The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.
*
* The default is `desc`.
*/
"audit-log-order": "desc" | "asc";
/** gist_id parameter */
gist_id: string;
/** comment_id parameter */
Expand Down Expand Up @@ -11193,7 +11199,7 @@ export interface operations {
};
};
/**
* **Note:** The audit log REST API is currently in beta and is subject to change. To join the beta, talk to your services or sales contact at GitHub.
* **Note:** The audit log REST API is currently in beta and is subject to change.
*
* Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope.
*/
Expand All @@ -11220,6 +11226,12 @@ export interface operations {
after?: components["parameters"]["audit-log-after"];
/** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */
before?: components["parameters"]["audit-log-before"];
/**
* The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.
*
* The default is `desc`.
*/
order?: components["parameters"]["audit-log-order"];
/** Results per page (max 100) */
per_page?: components["parameters"]["per_page"];
};
Expand Down Expand Up @@ -13512,7 +13524,7 @@ export interface operations {
};
};
/**
* **Note:** The audit log REST API is currently in beta and is subject to change. To join the beta, talk to your services or sales contact at GitHub.
* **Note:** The audit log REST API is currently in beta and is subject to change.
*
* Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."
*
Expand Down Expand Up @@ -13540,6 +13552,12 @@ export interface operations {
after?: components["parameters"]["audit-log-after"];
/** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */
before?: components["parameters"]["audit-log-before"];
/**
* The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`.
*
* The default is `desc`.
*/
order?: components["parameters"]["audit-log-order"];
/** Results per page (max 100) */
per_page?: components["parameters"]["per_page"];
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"branches": "main"
},
"octokit": {
"openapi-version": "2.6.0"
"openapi-version": "2.7.0"
},
"renovate": {
"extends": [
Expand Down

0 comments on commit 52bf6e3

Please sign in to comment.