Skip to content

Commit 2b3ccc5

Browse files
committed
chore: update descriptions in types for existing methods
1 parent 0ead9cc commit 2b3ccc5

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

src/generated/method-types.ts

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3000,6 +3000,8 @@ export type RestEndpointMethods = {
30003000
*
30013001
* To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope.
30023002
*
3003+
* For public repositories, you may instead use the `public_repo` scope.
3004+
*
30033005
* GitHub Apps must have the `security_events` read permission to use this endpoint.
30043006
*/
30053007
listAlertsForOrg: {
@@ -4402,9 +4404,7 @@ export type RestEndpointMethods = {
44024404
defaults: RequestInterface["defaults"];
44034405
endpoint: EndpointInterface<{ url: string }>;
44044406
};
4405-
/**
4406-
* **Note**: This was previously `/gists/:gist_id/fork`.
4407-
*/
4407+
44084408
fork: {
44094409
(
44104410
params?: RestEndpointMethodTypes["gists"]["fork"]["parameters"]
@@ -4639,6 +4639,8 @@ export type RestEndpointMethods = {
46394639
* The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.
46404640
*
46414641
* If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)."
4642+
*
4643+
* Returns an error if you try to delete a file that does not exist.
46424644
*/
46434645
createTree: {
46444646
(
@@ -7086,8 +7088,6 @@ export type RestEndpointMethods = {
70867088
*
70877089
* To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
70887090
*
7089-
* You can create a new pull request.
7090-
*
70917091
* This endpoint triggers [notifications](https://docs.github.com/en/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-rate-limits)" for details.
70927092
*/
70937093
create: {
@@ -7114,7 +7114,7 @@ export type RestEndpointMethods = {
71147114
/**
71157115
* This endpoint triggers [notifications](https://docs.github.com/en/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.
71167116
*
7117-
* Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response.
7117+
* Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/rest/pulls#submit-a-review-for-a-pull-request)."
71187118
*
71197119
* **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint.
71207120
*
@@ -7264,7 +7264,7 @@ export type RestEndpointMethods = {
72647264
endpoint: EndpointInterface<{ url: string }>;
72657265
};
72667266
/**
7267-
* Lists the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation.
7267+
* Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation.
72687268
*/
72697269
listRequestedReviewers: {
72707270
(
@@ -7341,7 +7341,9 @@ export type RestEndpointMethods = {
73417341
defaults: RequestInterface["defaults"];
73427342
endpoint: EndpointInterface<{ url: string }>;
73437343
};
7344-
7344+
/**
7345+
* Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/rest/pulls#create-a-review-for-a-pull-request)."
7346+
*/
73457347
submitReview: {
73467348
(
73477349
params?: RestEndpointMethodTypes["pulls"]["submitReview"]["parameters"]
@@ -8175,11 +8177,11 @@ export type RestEndpointMethods = {
81758177
/**
81768178
* Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
81778179
*
8178-
* **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)."
8180+
* **Note:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)."
81798181
*
81808182
* **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
81818183
*
8182-
* You must authenticate using an access token with the repo scope to use this endpoint.
8184+
* You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint.
81838185
*/
81848186
createOrUpdateEnvironment: {
81858187
(
@@ -8580,7 +8582,8 @@ export type RestEndpointMethods = {
85808582
* Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually
85818583
* `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
85828584
* the `Location` header to make a second `GET` request.
8583-
* **Note**: For private repositories, these links are temporary and expire after five minutes.
8585+
*
8586+
* **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect.
85848587
* @deprecated octokit.rest.repos.downloadArchive() has been renamed to octokit.rest.repos.downloadZipballArchive() (2020-09-17)
85858588
*/
85868589
downloadArchive: {
@@ -8611,7 +8614,8 @@ export type RestEndpointMethods = {
86118614
* Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually
86128615
* `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
86138616
* the `Location` header to make a second `GET` request.
8614-
* **Note**: For private repositories, these links are temporary and expire after five minutes.
8617+
*
8618+
* **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect.
86158619
*/
86168620
downloadZipballArchive: {
86178621
(
@@ -8707,7 +8711,7 @@ export type RestEndpointMethods = {
87078711
endpoint: EndpointInterface<{ url: string }>;
87088712
};
87098713
/**
8710-
* Get all environments for a repository.
8714+
* Lists the environments for a repository.
87118715
*
87128716
* Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
87138717
*/
@@ -9051,7 +9055,11 @@ export type RestEndpointMethods = {
90519055
endpoint: EndpointInterface<{ url: string }>;
90529056
};
90539057
/**
9054-
* Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
9058+
* **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)."
9059+
*
9060+
* Anyone with read access to the repository can use this endpoint. If the
9061+
* repository is private, you must use an access token with the `repo` scope. GitHub
9062+
* Apps must have the `actions:read` permission to use this endpoint.
90559063
*/
90569064
getEnvironment: {
90579065
(
@@ -10306,7 +10314,7 @@ export type RestEndpointMethods = {
1030610314
/**
1030710315
* Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
1030810316
*
10309-
* When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
10317+
* When searching for users, you can get text match metadata for the issue **login**, public **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
1031010318
*
1031110319
* For example, if you're looking for a list of popular users, you might try this query:
1031210320
*

0 commit comments

Comments
 (0)