Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typescript): update documentation on endpoints #639

Merged
merged 1 commit into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/pulls/checkIfMerged.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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