Skip to content

Commit

Permalink
fix(typescript): update documentation on endpoints (#639)
Browse files Browse the repository at this point in the history
WIP octokit/openapi updated
  • Loading branch information
octokitbot committed May 17, 2023
1 parent 6ab7627 commit a7ff767
Show file tree
Hide file tree
Showing 11 changed files with 9,456 additions and 41,486 deletions.
2 changes: 2 additions & 0 deletions docs/pulls/checkIfMerged.md
Expand Up @@ -8,6 +8,8 @@ type: API method

# Check if a pull request has been merged

Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty.

```js
octokit.rest.pulls.checkIfMerged({
owner,
Expand Down
2 changes: 2 additions & 0 deletions docs/pulls/deletePendingReview.md
Expand Up @@ -8,6 +8,8 @@ type: API method

# Delete a pending review for a pull request

Deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.

```js
octokit.rest.pulls.deletePendingReview({
owner,
Expand Down
2 changes: 2 additions & 0 deletions docs/pulls/getReview.md
Expand Up @@ -8,6 +8,8 @@ type: API method

# Get a review for a pull request

Retrieves a pull request review by its ID.

```js
octokit.rest.pulls.getReview({
owner,
Expand Down
1 change: 1 addition & 0 deletions docs/pulls/merge.md
Expand Up @@ -8,6 +8,7 @@ type: API method

# Merge a pull request

Merges a pull request into the base branch.
This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.

```js
Expand Down
2 changes: 2 additions & 0 deletions docs/pulls/removeRequestedReviewers.md
Expand Up @@ -8,6 +8,8 @@ type: API method

# Remove requested reviewers from a pull request

Removes review requests from a pull request for a given set of users and/or teams.

```js
octokit.rest.pulls.removeRequestedReviewers({
owner,
Expand Down
4 changes: 4 additions & 0 deletions docs/repos/getLatestPagesBuild.md
Expand Up @@ -8,6 +8,10 @@ type: API method

# Get latest Pages build

Gets information about the single most recent build of a GitHub Pages site.

A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission.

```js
octokit.rest.repos.getLatestPagesBuild({
owner,
Expand Down
4 changes: 4 additions & 0 deletions docs/repos/getPages.md
Expand Up @@ -8,6 +8,10 @@ type: API method

# Get a GitHub Pages site

Gets information about a GitHub Pages site.

A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission.

```js
octokit.rest.repos.getPages({
owner,
Expand Down
4 changes: 4 additions & 0 deletions docs/repos/getPagesBuild.md
Expand Up @@ -8,6 +8,10 @@ type: API method

# Get GitHub Pages build

Gets information about a GitHub Pages build.

A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission.

```js
octokit.rest.repos.getPagesBuild({
owner,
Expand Down
4 changes: 4 additions & 0 deletions docs/repos/listPagesBuilds.md
Expand Up @@ -8,6 +8,10 @@ type: API method

# List GitHub Pages builds

Lists builts of a GitHub Pages site.

A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission.

```js
octokit.rest.repos.listPagesBuilds({
owner,
Expand Down
50,877 changes: 9,398 additions & 41,479 deletions scripts/update-endpoints/generated/endpoints.json

Large diffs are not rendered by default.

40 changes: 33 additions & 7 deletions src/generated/method-types.ts
Expand Up @@ -7932,6 +7932,9 @@ export type RestEndpointMethods = {
};
};
pulls: {
/**
* Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty.
*/
checkIfMerged: {
(
params?: RestEndpointMethodTypes["pulls"]["checkIfMerged"]["parameters"]
Expand Down Expand Up @@ -8001,7 +8004,9 @@ export type RestEndpointMethods = {
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};

/**
* Deletes a pull request review that has not been submitted. Submitted reviews cannot be deleted.
*/
deletePendingReview: {
(
params?: RestEndpointMethodTypes["pulls"]["deletePendingReview"]["parameters"]
Expand Down Expand Up @@ -8057,7 +8062,9 @@ export type RestEndpointMethods = {
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};

/**
* Retrieves a pull request review by its ID.
*/
getReview: {
(
params?: RestEndpointMethodTypes["pulls"]["getReview"]["parameters"]
Expand Down Expand Up @@ -8166,6 +8173,7 @@ export type RestEndpointMethods = {
endpoint: EndpointInterface<{ url: string }>;
};
/**
* Merges a pull request into the base branch.
* This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
*/
merge: {
Expand All @@ -8175,7 +8183,9 @@ export type RestEndpointMethods = {
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};

/**
* Removes review requests from a pull request for a given set of users and/or teams.
*/
removeRequestedReviewers: {
(
params?: RestEndpointMethodTypes["pulls"]["removeRequestedReviewers"]["parameters"]
Expand Down Expand Up @@ -10062,7 +10072,11 @@ export type RestEndpointMethods = {
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};

/**
* Gets information about the single most recent build of a GitHub Pages site.
*
* A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission.
*/
getLatestPagesBuild: {
(
params?: RestEndpointMethodTypes["repos"]["getLatestPagesBuild"]["parameters"]
Expand Down Expand Up @@ -10108,15 +10122,23 @@ export type RestEndpointMethods = {
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};

/**
* Gets information about a GitHub Pages site.
*
* A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission.
*/
getPages: {
(
params?: RestEndpointMethodTypes["repos"]["getPages"]["parameters"]
): Promise<RestEndpointMethodTypes["repos"]["getPages"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};

/**
* Gets information about a GitHub Pages build.
*
* A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission.
*/
getPagesBuild: {
(
params?: RestEndpointMethodTypes["repos"]["getPagesBuild"]["parameters"]
Expand Down Expand Up @@ -10662,7 +10684,11 @@ export type RestEndpointMethods = {
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{ url: string }>;
};

/**
* Lists builts of a GitHub Pages site.
*
* A token with the `repo` scope is required. GitHub Apps must have the `pages:read` permission.
*/
listPagesBuilds: {
(
params?: RestEndpointMethodTypes["repos"]["listPagesBuilds"]["parameters"]
Expand Down

0 comments on commit a7ff767

Please sign in to comment.