diff --git a/cache/openapi-schema.json b/cache/openapi-schema.json index 1538412ad..c55a67c0f 100644 --- a/cache/openapi-schema.json +++ b/cache/openapi-schema.json @@ -10048,7 +10048,7 @@ "/orgs/{org}/interaction-limits": { "get": { "summary": "Get interaction restrictions for an organization", - "description": "Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response.", + "description": "Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.", "tags": [ "interactions" ], @@ -10068,11 +10068,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/interaction-limit" + "$ref": "#/components/schemas/interaction-limit-response" }, "examples": { "default": { - "$ref": "#/components/examples/interaction-limit" + "$ref": "#/components/examples/interaction-limit-response" } } } @@ -10091,7 +10091,7 @@ }, "put": { "summary": "Set interaction restrictions for an organization", - "description": "Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions.", + "description": "Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.", "tags": [ "interactions" ], @@ -10109,24 +10109,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "limit": { - "type": "string", - "description": "Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`.", - "enum": [ - "existing_users", - "contributors_only", - "collaborators_only" - ] - } - }, - "required": [ - "limit" - ] - }, - "example": { - "limit": "collaborators_only" + "$ref": "#/components/schemas/interaction-limit" } } } @@ -10137,11 +10120,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/interaction-limit" + "$ref": "#/components/schemas/interaction-limit-response" }, "examples": { "default": { - "$ref": "#/components/examples/interaction-limit" + "$ref": "#/components/examples/interaction-limit-response" } } } @@ -20242,10 +20225,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "contexts parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "contexts": { + "type": "array", + "description": "contexts parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] } } } @@ -20316,10 +20312,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "contexts parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "contexts": { + "type": "array", + "description": "contexts parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] } } } @@ -20386,10 +20395,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "contexts parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "contexts": { + "type": "array", + "description": "contexts parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] } } } @@ -20604,10 +20626,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "apps parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "apps": { + "type": "array", + "description": "apps parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "apps" + ], + "example": { + "apps": [ + "my-app" + ] } } } @@ -20673,10 +20708,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "apps parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "apps": { + "type": "array", + "description": "apps parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "apps" + ], + "example": { + "apps": [ + "my-app" + ] } } } @@ -20742,10 +20790,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "apps parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "apps": { + "type": "array", + "description": "apps parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "apps" + ], + "example": { + "apps": [ + "my-app" + ] } } } @@ -20868,10 +20929,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "teams parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "teams": { + "type": "array", + "description": "teams parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] } } } @@ -20937,10 +21011,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "teams parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "teams": { + "type": "array", + "description": "teams parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] } } } @@ -21006,10 +21093,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "teams parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "teams": { + "type": "array", + "description": "teams parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] } } } @@ -21132,10 +21232,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "users parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "users": { + "type": "array", + "description": "users parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] } } } @@ -21201,10 +21314,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "users parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "users": { + "type": "array", + "description": "users parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] } } } @@ -21270,10 +21396,23 @@ "content": { "application/json": { "schema": { - "type": "array", - "description": "users parameter", - "items": { - "type": "string" + "type": "object", + "properties": { + "users": { + "type": "array", + "description": "users parameter", + "items": { + "type": "string" + } + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] } } } @@ -22352,7 +22491,7 @@ "/repos/{owner}/{repo}/code-scanning/alerts": { "get": { "summary": "List code scanning alerts for a repository", - "description": "Lists all open code scanning alerts for the default branch (usually `master`) and protected branches in a repository. For private repos, you must use an access token with the `repo` scope. For public repos, you must use an access token with `public_repo` and `repo:security_events` scopes. GitHub Apps must have the `security_events` read permission to use this endpoint.", + "description": "Lists all open code scanning alerts for the default branch (usually `main` or `master`). For private repos, you must use an access token with the `repo` scope. For public repos, you must use an access token with `public_repo` and `repo:security_events` scopes. GitHub Apps must have the `security_events` read permission to use this endpoint.", "tags": [ "code-scanning" ], @@ -23573,12 +23712,12 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/simple-commit" + "$ref": "#/components/schemas/commit" } }, "examples": { "default": { - "$ref": "#/components/examples/simple-commit-items" + "$ref": "#/components/examples/commit-items" } } } @@ -24364,7 +24503,7 @@ "/repos/{owner}/{repo}/community/profile": { "get": { "summary": "Get community profile metrics", - "description": "This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE\\_TEMPLATE, PULL\\_REQUEST\\_TEMPLATE, README, and CONTRIBUTING files.", + "description": "This endpoint will return all community profile metrics, including an\noverall health score, repository description, the presence of documentation, detected\ncode of conduct, detected license, and the presence of ISSUE\\_TEMPLATE, PULL\\_REQUEST\\_TEMPLATE,\nREADME, and CONTRIBUTING files.\n\n`content_reports_enabled` is only returned for organization-owned repositories.", "tags": [ "repos" ], @@ -24401,9 +24540,6 @@ "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, - "previews": [ - - ], "category": "repos", "subcategory": "community" } @@ -28292,7 +28428,7 @@ "/repos/{owner}/{repo}/interaction-limits": { "get": { "summary": "Get interaction restrictions for a repository", - "description": "Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.", + "description": "Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.", "tags": [ "interactions" ], @@ -28315,7 +28451,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/interaction-limit" + "$ref": "#/components/schemas/interaction-limit-response" }, "examples": { "default": { @@ -28338,7 +28474,7 @@ }, "put": { "summary": "Set interaction restrictions for a repository", - "description": "Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions.", + "description": "Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.", "tags": [ "interactions" ], @@ -28359,24 +28495,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "limit": { - "type": "string", - "description": "Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`.", - "enum": [ - "existing_users", - "contributors_only", - "collaborators_only" - ] - } - }, - "required": [ - "limit" - ] - }, - "example": { - "limit": "collaborators_only" + "$ref": "#/components/schemas/interaction-limit" } } } @@ -28387,7 +28506,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/interaction-limit" + "$ref": "#/components/schemas/interaction-limit-response" }, "examples": { "default": { @@ -28396,6 +28515,9 @@ } } } + }, + "409": { + "description": "Conflict" } }, "x-github": { @@ -28410,7 +28532,7 @@ }, "delete": { "summary": "Remove interaction restrictions for a repository", - "description": "Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions.", + "description": "Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.", "tags": [ "interactions" ], @@ -28430,6 +28552,9 @@ "responses": { "204": { "description": "Empty response" + }, + "409": { + "description": "Conflict" } }, "x-github": { @@ -34311,12 +34436,12 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/simple-commit" + "$ref": "#/components/schemas/commit" } }, "examples": { "default": { - "$ref": "#/components/examples/simple-commit-items" + "$ref": "#/components/examples/commit-items" } } } @@ -39806,7 +39931,7 @@ "/search/issues": { "get": { "summary": "Search issues and pull requests", - "description": "Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted\nsearch results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.\n\n`q=windows+label:bug+language:python+state:open&sort=created&order=asc`\n\nThis query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, whick means the oldest issues appear first in the search results.\n\n**Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see \"[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests).\"", + "description": "Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).\n\nWhen searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted\nsearch results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).\n\nFor example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.\n\n`q=windows+label:bug+language:python+state:open&sort=created&order=asc`\n\nThis query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.\n\n**Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see \"[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests).\"", "tags": [ "search" ], @@ -44264,6 +44389,122 @@ } } }, + "/user/interaction-limits": { + "get": { + "summary": "Get interaction restrictions for your public repositories", + "description": "Shows which type of GitHub user can interact with your public repositories and when the restriction expires. If there are no restrictions, you will see an empty response.", + "tags": [ + "interactions" + ], + "operationId": "interactions/get-restrictions-for-your-public-repos", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories" + }, + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/interaction-limit-response" + }, + "examples": { + "default": { + "$ref": "#/components/examples/interaction-limit-user" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + + ], + "category": "interactions", + "subcategory": "user" + } + }, + "put": { + "summary": "Set interaction restrictions for your public repositories", + "description": "Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.", + "tags": [ + "interactions" + ], + "operationId": "interactions/set-restrictions-for-your-public-repos", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories" + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/interaction-limit" + } + } + } + }, + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/interaction-limit-response" + }, + "examples": { + "default": { + "$ref": "#/components/examples/interaction-limit-user" + } + } + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + + ], + "category": "interactions", + "subcategory": "user" + } + }, + "delete": { + "summary": "Remove interaction restrictions from your public repositories", + "description": "Removes any interaction restrictions from your public repositories.", + "tags": [ + "interactions" + ], + "operationId": "interactions/remove-restrictions-for-your-public-repos", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories" + }, + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + + ], + "category": "interactions", + "subcategory": "user" + } + } + }, "/user/issues": { "get": { "summary": "List user account issues assigned to the authenticated user", @@ -53027,20 +53268,23 @@ "updated_at" ] }, - "interaction-limit": { + "interaction-group": { + "type": "string", + "description": "The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`.", + "example": "collaborators_only", + "enum": [ + "existing_users", + "contributors_only", + "collaborators_only" + ] + }, + "interaction-limit-response": { "title": "Interaction Limits", "description": "Interaction limit settings.", "type": "object", "properties": { "limit": { - "description": "The interaction limit to enable.", - "enum": [ - "existing_users", - "contributors_only", - "collaborators_only" - ], - "example": "existing_users", - "type": "string" + "$ref": "#/components/schemas/interaction-group" }, "origin": { "type": "string", @@ -53058,6 +53302,34 @@ "expires_at" ] }, + "interaction-expiry": { + "type": "string", + "description": "The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`.", + "example": "one_month", + "enum": [ + "one_day", + "three_days", + "one_week", + "one_month", + "six_months" + ] + }, + "interaction-limit": { + "title": "Interaction Restrictions", + "description": "Limit interactions to a specific type of user for a specified duration", + "type": "object", + "properties": { + "limit": { + "$ref": "#/components/schemas/interaction-group" + }, + "expiry": { + "$ref": "#/components/schemas/interaction-expiry" + } + }, + "required": [ + "limit" + ] + }, "organization-invitation": { "title": "Organization Invitation", "description": "Organization Invitation", @@ -57649,10 +57921,19 @@ "type": "string", "description": "**Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`.", "nullable": true, - "enum": [ - "false positive", - "won't fix", - "used in tests" + "oneOf": [ + { + "enum": [ + "false positive", + "won't fix", + "used in tests" + ] + }, + { + "enum": [ + null + ] + } ] }, "code-scanning-alert-rule": { @@ -58814,6 +59095,10 @@ "format": "date-time", "example": "2017-02-28T19:09:29Z", "nullable": true + }, + "content_reports_enabled": { + "type": "boolean", + "example": true } }, "required": [ @@ -69209,7 +69494,7 @@ ] } }, - "interaction-limit": { + "interaction-limit-response": { "value": { "limit": "collaborators_only", "origin": "organization", @@ -74036,28 +74321,9 @@ "url": "https://api.github.com/repos/github/hello-world/code-scanning/alerts/4", "html_url": "https://github.com/github/hello-world/code-scanning/4", "state": "open", - "dismissed_by": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "dismissed_at": "2020-02-14T12:29:18Z", - "dismissed_reason": "false positive", + "dismissed_by": null, + "dismissed_at": null, + "dismissed_reason": null, "rule": { "id": "js/zipslip", "severity": "error", @@ -74072,8 +74338,8 @@ "number": 3, "created_at": "2020-02-13T12:29:18Z", "url": "https://api.github.com/repos/github/hello-world/code-scanning/alerts/3", - "html_url": "https://github.com/dsp-testing/github/hello-world/code-scanning/3", - "state": "open", + "html_url": "https://github.com/github/hello-world/code-scanning/3", + "state": "dismissed", "dismissed_by": { "login": "octocat", "id": 1, @@ -74110,13 +74376,13 @@ }, "code-scanning-alert-code-scanning-alert": { "value": { - "number": 22, + "number": 42, "created_at": "2020-06-19T11:21:34Z", - "url": "https://api.github.com/repos/github/hello-world/code-scanning/alerts/22", - "html_url": "https://github.com/github/hello-world/code-scanning/22", + "url": "https://api.github.com/repos/github/hello-world/code-scanning/alerts/42", + "html_url": "https://github.com/github/hello-world/code-scanning/42", "instances": [ { - "ref": "refs/heads/codeql-analysis-yml", + "ref": "refs/heads/main", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", "state": "fixed" @@ -74125,10 +74391,10 @@ "ref": "refs/pull/3740/head", "analysis_key": ".github/workflows/codeql-analysis.yml:CodeQL-Build", "environment": "", - "state": "fixed" + "state": "dismissed" } ], - "state": "fixed", + "state": "dismissed", "dismissed_by": { "login": "octocat", "id": 1, @@ -74164,10 +74430,10 @@ }, "code-scanning-alert-code-scanning-alert-dismissed": { "value": { - "number": 22, + "number": 42, "created_at": "2020-08-25T21:28:36Z", - "url": "https://api.github.com/repos/github/hello-world/code-scanning/alerts/22", - "html_url": "https://github.com/github/hello-world/code-scanning/22", + "url": "https://api.github.com/repos/github/hello-world/code-scanning/alerts/42", + "html_url": "https://github.com/github/hello-world/code-scanning/42", "instances": [ { "ref": "refs/heads/codeql-analysis-yml", @@ -74521,35 +74787,85 @@ "updated_at": "2011-04-14T16:00:49Z" } }, - "simple-commit-items": { + "commit-items": { "value": [ { - "id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "tree_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "message": "Fix all the bugs", - "timestamp": "2016-10-10T00:00:00Z", - "author": { - "name": "Monalisa Octocat", - "email": "mona@github.com" + "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "node_id": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==", + "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments", + "commit": { + "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "author": { + "name": "Monalisa Octocat", + "email": "support@github.com", + "date": "2011-04-14T16:00:49Z" + }, + "committer": { + "name": "Monalisa Octocat", + "email": "support@github.com", + "date": "2011-04-14T16:00:49Z" + }, + "message": "Fix all the bugs", + "tree": { + "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" + }, + "comment_count": 0, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } }, - "committer": { - "name": "Monalisa Octocat", - "email": "mona@github.com" - } - }, - { - "id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "tree_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "message": "Fix all the bugs", - "timestamp": "2016-10-10T00:00:00Z", "author": { - "name": "Monalisa Octocat", - "email": "mona@github.com" + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false }, "committer": { - "name": "Monalisa Octocat", - "email": "mona@github.com" - } + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e" + } + ] } ] }, @@ -75553,7 +75869,8 @@ "html_url": "https://github.com/octocat/Hello-World/blob/master/README.md" } }, - "updated_at": "2017-02-28T19:09:29Z" + "updated_at": "2017-02-28T19:09:29Z", + "content_reports_enabled": true } }, "commit-comparison": { @@ -82515,6 +82832,13 @@ ] } }, + "interaction-limit-user": { + "value": { + "limit": "collaborators_only", + "origin": "user", + "expires_at": "2018-08-17T04:18:39Z" + } + }, "key-items": { "value": [ { diff --git a/generated/types.ts b/generated/types.ts index 721fd0f4f..d2e73ac78 100644 --- a/generated/types.ts +++ b/generated/types.ts @@ -1437,6 +1437,11 @@ export interface paths { put: operations["apps/add-repo-to-installation"]; delete: operations["apps/remove-repo-from-installation"]; }; + "/user/interaction-limits": { + get: operations["interactions/get-restrictions-for-your-public-repos"]; + put: operations["interactions/set-restrictions-for-your-public-repos"]; + delete: operations["interactions/remove-restrictions-for-your-public-repos"]; + }; "/user/issues": { get: operations["issues/list-for-authenticated-user"]; }; @@ -5821,7 +5826,7 @@ export interface operations { }; }; /** - * Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response. + * Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ "interactions/get-restrictions-for-org": { parameters: { @@ -5834,12 +5839,12 @@ export interface operations { * response */ "200": { - "application/json": components["schemas"]["interaction-limit"]; + "application/json": components["schemas"]["interaction-limit-response"]; }; }; }; /** - * Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions. + * Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ "interactions/set-restrictions-for-org": { parameters: { @@ -5848,19 +5853,14 @@ export interface operations { }; }; requestBody: { - "application/json": { - /** - * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. - */ - limit: "existing_users" | "contributors_only" | "collaborators_only"; - }; + "application/json": components["schemas"]["interaction-limit"]; }; responses: { /** * response */ "200": { - "application/json": components["schemas"]["interaction-limit"]; + "application/json": components["schemas"]["interaction-limit-response"]; }; "422": unknown; }; @@ -10287,7 +10287,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * contexts parameter + */ + contexts: string[]; + }; }; responses: { /** @@ -10313,7 +10318,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * contexts parameter + */ + contexts: string[]; + }; }; responses: { /** @@ -10338,7 +10348,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * contexts parameter + */ + contexts: string[]; + }; }; responses: { /** @@ -10437,7 +10452,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * apps parameter + */ + apps: string[]; + }; }; responses: { /** @@ -10467,7 +10487,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * apps parameter + */ + apps: string[]; + }; }; responses: { /** @@ -10497,7 +10522,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * apps parameter + */ + apps: string[]; + }; }; responses: { /** @@ -10550,7 +10580,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * teams parameter + */ + teams: string[]; + }; }; responses: { /** @@ -10580,7 +10615,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * teams parameter + */ + teams: string[]; + }; }; responses: { /** @@ -10610,7 +10650,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * teams parameter + */ + teams: string[]; + }; }; responses: { /** @@ -10663,7 +10708,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * users parameter + */ + users: string[]; + }; }; responses: { /** @@ -10693,7 +10743,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * users parameter + */ + users: string[]; + }; }; responses: { /** @@ -10723,7 +10778,12 @@ export interface operations { }; }; requestBody: { - "application/json": string[]; + "application/json": { + /** + * users parameter + */ + users: string[]; + }; }; responses: { /** @@ -11237,7 +11297,7 @@ export interface operations { }; }; /** - * Lists all open code scanning alerts for the default branch (usually `master`) and protected branches in a repository. For private repos, you must use an access token with the `repo` scope. For public repos, you must use an access token with `public_repo` and `repo:security_events` scopes. GitHub Apps must have the `security_events` read permission to use this endpoint. + * Lists all open code scanning alerts for the default branch (usually `main` or `master`). For private repos, you must use an access token with the `repo` scope. For public repos, you must use an access token with `public_repo` and `repo:security_events` scopes. GitHub Apps must have the `security_events` read permission to use this endpoint. */ "code-scanning/list-alerts-for-repo": { parameters: { @@ -11795,7 +11855,7 @@ export interface operations { * response */ "200": { - "application/json": components["schemas"]["simple-commit"][]; + "application/json": components["schemas"]["commit"][]; }; "400": unknown; "404": unknown; @@ -12138,7 +12198,12 @@ export interface operations { }; }; /** - * This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, README, and CONTRIBUTING files. + * This endpoint will return all community profile metrics, including an + * overall health score, repository description, the presence of documentation, detected + * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * `content_reports_enabled` is only returned for organization-owned repositories. */ "repos/get-community-profile-metrics": { parameters: { @@ -14021,7 +14086,7 @@ export interface operations { }; }; /** - * Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + * Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ "interactions/get-restrictions-for-repo": { parameters: { @@ -14035,12 +14100,12 @@ export interface operations { * response */ "200": { - "application/json": components["schemas"]["interaction-limit"]; + "application/json": components["schemas"]["interaction-limit-response"]; }; }; }; /** - * Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions. + * Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ "interactions/set-restrictions-for-repo": { parameters: { @@ -14050,24 +14115,23 @@ export interface operations { }; }; requestBody: { - "application/json": { - /** - * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. - */ - limit: "existing_users" | "contributors_only" | "collaborators_only"; - }; + "application/json": components["schemas"]["interaction-limit"]; }; responses: { /** * response */ "200": { - "application/json": components["schemas"]["interaction-limit"]; + "application/json": components["schemas"]["interaction-limit-response"]; }; + /** + * Conflict + */ + "409": unknown; }; }; /** - * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. + * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ "interactions/remove-restrictions-for-repo": { parameters: { @@ -14081,6 +14145,10 @@ export interface operations { * Empty response */ "204": never; + /** + * Conflict + */ + "409": unknown; }; }; /** @@ -16421,7 +16489,7 @@ export interface operations { * response */ "200": { - "application/json": components["schemas"]["simple-commit"][]; + "application/json": components["schemas"]["commit"][]; }; }; }; @@ -18689,7 +18757,7 @@ export interface operations { * * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` * - * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, whick means the oldest issues appear first in the search results. + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. * * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." */ @@ -20585,6 +20653,47 @@ export interface operations { "404": unknown; }; }; + /** + * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + "interactions/get-restrictions-for-your-public-repos": { + responses: { + /** + * response + */ + "200": { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + }; + /** + * Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. + */ + "interactions/set-restrictions-for-your-public-repos": { + requestBody: { + "application/json": components["schemas"]["interaction-limit"]; + }; + responses: { + /** + * response + */ + "200": { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + "422": unknown; + }; + }; + /** + * Removes any interaction restrictions from your public repositories. + */ + "interactions/remove-restrictions-for-your-public-repos": { + responses: { + /** + * Empty response + */ + "204": never; + }; + }; /** * List issues across owned and member repositories assigned to the authenticated user. * @@ -23803,17 +23912,37 @@ export interface components { created_at: string; type: string; }; + /** + * The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; /** * Interaction limit settings. */ - "interaction-limit": { - /** - * The interaction limit to enable. - */ - limit: "existing_users" | "contributors_only" | "collaborators_only"; + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; origin: string; expires_at: string; }; + /** + * The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; /** * Organization Invitation */ @@ -25168,9 +25297,7 @@ export interface components { /** * **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. */ - "code-scanning-alert-dismissed-reason": - | ("false positive" | "won't fix" | "used in tests") - | null; + "code-scanning-alert-dismissed-reason": string | null; "code-scanning-alert-rule": { /** * A unique identifier for the rule used to detect the alert. @@ -25501,6 +25628,7 @@ export interface components { | null; }; updated_at: string | null; + content_reports_enabled?: boolean; }; /** * Diff Entry diff --git a/package-lock.json b/package-lock.json index 968778697..6112f8081 100644 --- a/package-lock.json +++ b/package-lock.json @@ -445,9 +445,9 @@ "dev": true }, "prettier": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", - "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", + "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", "dev": true }, "quick-lru": {