From 7c4a4674c28fadbfea73b9427c32b0d221cdd507 Mon Sep 17 00:00:00 2001 From: docs-bot <77750099+docs-bot@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:50:17 -0700 Subject: [PATCH 1/2] Update OpenAPI Description (#43517) Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com> --- content/rest/orgs/index.md | 1 + content/rest/orgs/rule-suites.md | 14 + content/rest/orgs/rules.md | 2 +- content/rest/repos/index.md | 1 + content/rest/repos/rule-suites.md | 14 + .../fine-grained-pat-permissions.json | 36 + .../data/fpt-2022-11-28/fine-grained-pat.json | 24 + .../server-to-server-permissions.json | 44 + .../fpt-2022-11-28/server-to-server-rest.json | 24 + .../fpt-2022-11-28/user-to-server-rest.json | 24 + .../fine-grained-pat-permissions.json | 36 + .../ghec-2022-11-28/fine-grained-pat.json | 24 + .../server-to-server-permissions.json | 44 + .../server-to-server-rest.json | 24 + .../ghec-2022-11-28/user-to-server-rest.json | 24 + src/github-apps/lib/config.json | 2 +- src/rest/data/fpt-2022-11-28/schema.json | 905 ++++++++++++++++++ src/rest/data/ghec-2022-11-28/schema.json | 905 ++++++++++++++++++ src/rest/lib/config.json | 2 +- src/webhooks/lib/config.json | 2 +- 20 files changed, 2148 insertions(+), 4 deletions(-) create mode 100644 content/rest/orgs/rule-suites.md create mode 100644 content/rest/repos/rule-suites.md diff --git a/content/rest/orgs/index.md b/content/rest/orgs/index.md index 2d7e2e1b80..a9eb11561a 100644 --- a/content/rest/orgs/index.md +++ b/content/rest/orgs/index.md @@ -22,6 +22,7 @@ children: - /outside-collaborators - /personal-access-tokens - /rules + - /rule-suites - /security-managers - /webhooks autogenerated: rest diff --git a/content/rest/orgs/rule-suites.md b/content/rest/orgs/rule-suites.md new file mode 100644 index 0000000000..ada54ecc02 --- /dev/null +++ b/content/rest/orgs/rule-suites.md @@ -0,0 +1,14 @@ +--- +title: Rule Suites +shortTitle: Rule Suites +intro: 'Use the REST API to manage rule suites for organizations.' +versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 + fpt: '*' + ghec: '*' +topics: + - API +autogenerated: rest +allowTitleToDifferFromFilename: true +--- + + diff --git a/content/rest/orgs/rules.md b/content/rest/orgs/rules.md index 1cf916535c..169160c7fa 100644 --- a/content/rest/orgs/rules.md +++ b/content/rest/orgs/rules.md @@ -2,7 +2,7 @@ title: Rules shortTitle: Rules intro: >- - Use the rulesets API to manage rulesets for repositories. Organization + Use the REST API to manage rulesets for organizations. Organization rulesets control how people can interact with selected branches and tags in repositories in an organization. versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 diff --git a/content/rest/repos/index.md b/content/rest/repos/index.md index 6520b6461f..720d75997e 100644 --- a/content/rest/repos/index.md +++ b/content/rest/repos/index.md @@ -21,6 +21,7 @@ children: - /lfs - /repos - /rules + - /rule-suites - /tags autogenerated: rest --- diff --git a/content/rest/repos/rule-suites.md b/content/rest/repos/rule-suites.md new file mode 100644 index 0000000000..2d55854866 --- /dev/null +++ b/content/rest/repos/rule-suites.md @@ -0,0 +1,14 @@ +--- +title: Rule Suites +shortTitle: Rule Suites +intro: 'Use the REST API to manage rule suites for repositories.' +versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 + fpt: '*' + ghec: '*' +topics: + - API +autogenerated: rest +allowTitleToDifferFromFilename: true +--- + + diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json index 73f5dce2eb..604dbb0f31 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json @@ -205,6 +205,24 @@ "additional-permissions": [], "access": "write" }, + { + "category": "orgs", + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites", + "additional-permissions": [], + "access": "write" + }, + { + "category": "orgs", + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", + "additional-permissions": [], + "access": "write" + }, { "category": "orgs", "slug": "get-an-organization-repository-ruleset", @@ -2799,6 +2817,24 @@ "additional-permissions": [], "access": "write" }, + { + "category": "repos", + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites", + "additional-permissions": [], + "access": "write" + }, + { + "category": "repos", + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}", + "additional-permissions": [], + "access": "write" + }, { "category": "repos", "slug": "update-a-repository-ruleset", diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json index 99528a7b8b..6244bce0b3 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json @@ -3002,6 +3002,18 @@ "verb": "post", "requestPath": "/orgs/{org}/rulesets" }, + { + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites" + }, + { + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-an-organization-repository-ruleset", "subcategory": "rules", @@ -3892,6 +3904,18 @@ "verb": "post", "requestPath": "/repos/{owner}/{repo}/rulesets" }, + { + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites" + }, + { + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-a-repository-ruleset", "subcategory": "rules", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json index ded4429fa0..0a6952f9b5 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json @@ -249,6 +249,28 @@ "server-to-server": true, "additional-permissions": [] }, + { + "category": "orgs", + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": [] + }, + { + "category": "orgs", + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": [] + }, { "category": "orgs", "slug": "get-an-organization-repository-ruleset", @@ -3481,6 +3503,28 @@ "server-to-server": true, "additional-permissions": [] }, + { + "category": "repos", + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": [] + }, + { + "category": "repos", + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": [] + }, { "category": "repos", "slug": "update-a-repository-ruleset", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json index 9226f1bcdb..ac96e05f74 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json @@ -2606,6 +2606,18 @@ "verb": "post", "requestPath": "/orgs/{org}/rulesets" }, + { + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites" + }, + { + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-an-organization-repository-ruleset", "subcategory": "rules", @@ -3520,6 +3532,18 @@ "verb": "post", "requestPath": "/repos/{owner}/{repo}/rulesets" }, + { + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites" + }, + { + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-a-repository-ruleset", "subcategory": "rules", diff --git a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json index 871cdc5f2a..4d8f2444f2 100644 --- a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json @@ -3068,6 +3068,18 @@ "verb": "post", "requestPath": "/orgs/{org}/rulesets" }, + { + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites" + }, + { + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-an-organization-repository-ruleset", "subcategory": "rules", @@ -3958,6 +3970,18 @@ "verb": "post", "requestPath": "/repos/{owner}/{repo}/rulesets" }, + { + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites" + }, + { + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-a-repository-ruleset", "subcategory": "rules", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json index 2e890042f8..c58782579e 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json @@ -477,6 +477,24 @@ "additional-permissions": [], "access": "write" }, + { + "category": "orgs", + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites", + "additional-permissions": [], + "access": "write" + }, + { + "category": "orgs", + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", + "additional-permissions": [], + "access": "write" + }, { "category": "orgs", "slug": "get-an-organization-repository-ruleset", @@ -3457,6 +3475,24 @@ "additional-permissions": [], "access": "write" }, + { + "category": "repos", + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites", + "additional-permissions": [], + "access": "write" + }, + { + "category": "repos", + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}", + "additional-permissions": [], + "access": "write" + }, { "category": "repos", "slug": "update-a-repository-ruleset", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json index e0b6a7e5f1..80bae6424d 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json @@ -3324,6 +3324,18 @@ "verb": "post", "requestPath": "/orgs/{org}/rulesets" }, + { + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites" + }, + { + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-an-organization-repository-ruleset", "subcategory": "rules", @@ -4214,6 +4226,18 @@ "verb": "post", "requestPath": "/repos/{owner}/{repo}/rulesets" }, + { + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites" + }, + { + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-a-repository-ruleset", "subcategory": "rules", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json index 6600488afb..d9f030fde2 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json @@ -577,6 +577,28 @@ "server-to-server": true, "additional-permissions": [] }, + { + "category": "orgs", + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": [] + }, + { + "category": "orgs", + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": [] + }, { "category": "orgs", "slug": "get-an-organization-repository-ruleset", @@ -4275,6 +4297,28 @@ "server-to-server": true, "additional-permissions": [] }, + { + "category": "repos", + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": [] + }, + { + "category": "repos", + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": [] + }, { "category": "repos", "slug": "update-a-repository-ruleset", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json index 567e0f4b69..56136b7751 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json @@ -2928,6 +2928,18 @@ "verb": "post", "requestPath": "/orgs/{org}/rulesets" }, + { + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites" + }, + { + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-an-organization-repository-ruleset", "subcategory": "rules", @@ -3842,6 +3854,18 @@ "verb": "post", "requestPath": "/repos/{owner}/{repo}/rulesets" }, + { + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites" + }, + { + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-a-repository-ruleset", "subcategory": "rules", diff --git a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json index 6380f82a74..1a890a547b 100644 --- a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json @@ -3390,6 +3390,18 @@ "verb": "post", "requestPath": "/orgs/{org}/rulesets" }, + { + "slug": "list-organization-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites" + }, + { + "slug": "get-an-organization-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-an-organization-repository-ruleset", "subcategory": "rules", @@ -4280,6 +4292,18 @@ "verb": "post", "requestPath": "/repos/{owner}/{repo}/rulesets" }, + { + "slug": "list-repository-rule-suites", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites" + }, + { + "slug": "get-a-repository-rule-suite", + "subcategory": "rule-suites", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + }, { "slug": "get-a-repository-ruleset", "subcategory": "rules", diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index fc164d5d11..6a4cb5e045 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "588349f3b71883016d36d3185aee4697ef812f41" + "sha": "ffaf232180dbaff57ce08fa5490df44bbc606501" } \ No newline at end of file diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index c22f3e12a6..ac7ef8e0c4 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -361836,6 +361836,448 @@ ] } ], + "rule-suites": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites", + "title": "List organization rule suites", + "category": "orgs", + "subcategory": "rule-suites", + "parameters": [ + { + "name": "org", + "description": "
The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repository_name", + "description": "The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned.
", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "time_period", + "description": "The time period to filter by.
\nFor example, day will filter for rule suites that occurred in the past 24 hours, and week will filter for insights that occurred in the past 7 days (168 hours).
The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.
", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "rule_suite_result", + "description": "The rule results to filter on. When specified, only suites with this result will be returned.
", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass", + "all" + ], + "default": "all" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100).
", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "id": 21, + "actor_id": 12, + "username": "octocat", + "before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d", + "after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01", + "ref": "refs/heads/i-see-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-06T08:43:03Z", + "result": "bypass" + }, + { + "id": 25, + "actor_id": 11, + "username": "not-octocat", + "before_sha": "48994e4e01ccc943624c6231f172702b82b233cc", + "after_sha": "ecfd5a1025fa271a33ca5608d089476a2df3c9a1", + "ref": "refs/heads/i-am-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-07T08:43:03Z", + "result": "pass", + "evaluation_result": "fail" + } + ], + "schema": { + "title": "Rule Suites", + "description": "Response", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the rule insight." + }, + "actor_id": { + "type": "integer", + "description": "The number that identifies the user." + }, + "actor_name": { + "type": "string", + "description": "The handle for the GitHub user account." + }, + "before_sha": { + "type": "string", + "description": "The first commit sha before the push evaluation." + }, + "after_sha": { + "type": "string", + "description": "The last commit sha in the push evaluation." + }, + "ref": { + "type": "string", + "description": "The ref name that the evaluation ran on." + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository associated with the rule evaluation." + }, + "repository_name": { + "type": "string", + "description": "The name of the repository without the `.git` extension." + }, + "pushed_at": { + "type": "string", + "format": "date-time", + "examples": [ + "2011-01-26T19:06:43Z" + ] + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass" + ], + "description": "The result of the rule evaluations for rules with the `active` enforcement status." + }, + "evaluation_result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`." + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists suites of rule evaluations at the organization level.\nFor more information, see \"Managing rulesets for repositories in your organization.\"
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", + "title": "Get an organization rule suite", + "category": "orgs", + "subcategory": "rule-suites", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "rule_suite_id", + "description": "The unique identifier of the rule suite result.\nTo get this ID, you can use GET /repos/{owner}/{repo}/rulesets/rule-suites\nfor repositories and GET /orgs/{org}/rulesets/rule-suites\nfor organizations.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "rule_suite_id": "RULE_SUITE_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 21, + "actor_id": 12, + "username": "octocat", + "before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d", + "after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01", + "ref": "refs/heads/i-see-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-06T08:43:03Z", + "result": "bypass", + "evaluation_result": "fail", + "rule_evaluations": [ + { + "rule_source": { + "type": "ruleset", + "id": 2, + "name": "Author email must be a GitHub email address" + }, + "enforcement": "active", + "result": "pass", + "rule_type": "commit_author_email_pattern" + }, + { + "rule_source": { + "type": "protected_branch" + }, + "enforcement": "active", + "result": "fail", + "rule_type": "pull_request", + "details": "Changes must be made through a pull request." + }, + { + "rule_source": { + "type": "ruleset", + "id": 3, + "name": "Evaluate commit message pattern" + }, + "enforcement": "evaluate", + "result": "fail", + "rule_type": "commit_message_pattern" + } + ] + }, + "schema": { + "title": "Rule Suite", + "description": "Response", + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the rule insight." + }, + "actor_id": { + "type": "integer", + "description": "The number that identifies the user." + }, + "actor_name": { + "type": "string", + "description": "The handle for the GitHub user account." + }, + "before_sha": { + "type": "string", + "description": "The first commit sha before the push evaluation." + }, + "after_sha": { + "type": "string", + "description": "The last commit sha in the push evaluation." + }, + "ref": { + "type": "string", + "description": "The ref name that the evaluation ran on." + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository associated with the rule evaluation." + }, + "repository_name": { + "type": "string", + "description": "The name of the repository without the `.git` extension." + }, + "pushed_at": { + "type": "string", + "format": "date-time", + "examples": [ + "2011-01-26T19:06:43Z" + ] + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass" + ], + "description": "The result of the rule evaluations for rules with the `active` enforcement status." + }, + "evaluation_result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`." + }, + "rule_evaluations": { + "type": "array", + "description": "Details on the evaluated rules.", + "items": { + "type": "object", + "properties": { + "rule_source": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of rule source." + }, + "id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the rule source." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the rule source." + } + } + }, + "enforcement": { + "type": "string", + "enum": [ + "active", + "evaluate", + "deleted ruleset" + ], + "description": "The enforcement level of this rule source." + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the evaluation of the individual rule." + }, + "rule_type": { + "type": "string", + "description": "The type of rule." + }, + "details": { + "type": "string", + "description": "Any associated details with the rule evaluation." + } + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets information about a suite of rule evaluations from within an organization.\nFor more information, see \"Managing rulesets for repositories in your organization.\"
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + } + ], "rules": [ { "serverUrl": "https://api.github.com", @@ -482573,6 +483015,469 @@ ] } ], + "rule-suites": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites", + "title": "List repository rule suites", + "category": "repos", + "subcategory": "rule-suites", + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git extension. The name is not case sensitive.
The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned.
", + "in": "query", + "schema": { + "type": "string" + }, + "x-multi-segment": true + }, + { + "name": "time_period", + "description": "The time period to filter by.
\nFor example, day will filter for rule suites that occurred in the past 24 hours, and week will filter for insights that occurred in the past 7 days (168 hours).
The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.
", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "rule_suite_result", + "description": "The rule results to filter on. When specified, only suites with this result will be returned.
", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass", + "all" + ], + "default": "all" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100).
", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "id": 21, + "actor_id": 12, + "username": "octocat", + "before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d", + "after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01", + "ref": "refs/heads/i-see-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-06T08:43:03Z", + "result": "bypass" + }, + { + "id": 25, + "actor_id": 11, + "username": "not-octocat", + "before_sha": "48994e4e01ccc943624c6231f172702b82b233cc", + "after_sha": "ecfd5a1025fa271a33ca5608d089476a2df3c9a1", + "ref": "refs/heads/i-am-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-07T08:43:03Z", + "result": "pass", + "evaluation_result": "fail" + } + ], + "schema": { + "title": "Rule Suites", + "description": "Response", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the rule insight." + }, + "actor_id": { + "type": "integer", + "description": "The number that identifies the user." + }, + "actor_name": { + "type": "string", + "description": "The handle for the GitHub user account." + }, + "before_sha": { + "type": "string", + "description": "The first commit sha before the push evaluation." + }, + "after_sha": { + "type": "string", + "description": "The last commit sha in the push evaluation." + }, + "ref": { + "type": "string", + "description": "The ref name that the evaluation ran on." + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository associated with the rule evaluation." + }, + "repository_name": { + "type": "string", + "description": "The name of the repository without the `.git` extension." + }, + "pushed_at": { + "type": "string", + "format": "date-time", + "examples": [ + "2011-01-26T19:06:43Z" + ] + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass" + ], + "description": "The result of the rule evaluations for rules with the `active` enforcement status." + }, + "evaluation_result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`." + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists suites of rule evaluations at the repository level.\nFor more information, see \"Managing rulesets for a repository.\"
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}", + "title": "Get a repository rule suite", + "category": "repos", + "subcategory": "rule-suites", + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git extension. The name is not case sensitive.
The unique identifier of the rule suite result.\nTo get this ID, you can use GET /repos/{owner}/{repo}/rulesets/rule-suites\nfor repositories and GET /orgs/{org}/rulesets/rule-suites\nfor organizations.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "rule_suite_id": "RULE_SUITE_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 21, + "actor_id": 12, + "username": "octocat", + "before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d", + "after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01", + "ref": "refs/heads/i-see-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-06T08:43:03Z", + "result": "bypass", + "evaluation_result": "fail", + "rule_evaluations": [ + { + "rule_source": { + "type": "ruleset", + "id": 2, + "name": "Author email must be a GitHub email address" + }, + "enforcement": "active", + "result": "pass", + "rule_type": "commit_author_email_pattern" + }, + { + "rule_source": { + "type": "protected_branch" + }, + "enforcement": "active", + "result": "fail", + "rule_type": "pull_request", + "details": "Changes must be made through a pull request." + }, + { + "rule_source": { + "type": "ruleset", + "id": 3, + "name": "Evaluate commit message pattern" + }, + "enforcement": "evaluate", + "result": "fail", + "rule_type": "commit_message_pattern" + } + ] + }, + "schema": { + "title": "Rule Suite", + "description": "Response", + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the rule insight." + }, + "actor_id": { + "type": "integer", + "description": "The number that identifies the user." + }, + "actor_name": { + "type": "string", + "description": "The handle for the GitHub user account." + }, + "before_sha": { + "type": "string", + "description": "The first commit sha before the push evaluation." + }, + "after_sha": { + "type": "string", + "description": "The last commit sha in the push evaluation." + }, + "ref": { + "type": "string", + "description": "The ref name that the evaluation ran on." + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository associated with the rule evaluation." + }, + "repository_name": { + "type": "string", + "description": "The name of the repository without the `.git` extension." + }, + "pushed_at": { + "type": "string", + "format": "date-time", + "examples": [ + "2011-01-26T19:06:43Z" + ] + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass" + ], + "description": "The result of the rule evaluations for rules with the `active` enforcement status." + }, + "evaluation_result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`." + }, + "rule_evaluations": { + "type": "array", + "description": "Details on the evaluated rules.", + "items": { + "type": "object", + "properties": { + "rule_source": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of rule source." + }, + "id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the rule source." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the rule source." + } + } + }, + "enforcement": { + "type": "string", + "enum": [ + "active", + "evaluate", + "deleted ruleset" + ], + "description": "The enforcement level of this rule source." + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the evaluation of the individual rule." + }, + "rule_type": { + "type": "string", + "description": "The type of rule." + }, + "details": { + "type": "string", + "description": "Any associated details with the rule evaluation." + } + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets information about a suite of rule evaluations from within a repository.\nFor more information, see \"Managing rulesets for a repository.\"
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + } + ], "rules": [ { "serverUrl": "https://api.github.com", diff --git a/src/rest/data/ghec-2022-11-28/schema.json b/src/rest/data/ghec-2022-11-28/schema.json index d3020b80f2..71ac431024 100644 --- a/src/rest/data/ghec-2022-11-28/schema.json +++ b/src/rest/data/ghec-2022-11-28/schema.json @@ -384132,6 +384132,448 @@ ] } ], + "rule-suites": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites", + "title": "List organization rule suites", + "category": "orgs", + "subcategory": "rule-suites", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repository_name", + "description": "The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned.
", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "time_period", + "description": "The time period to filter by.
\nFor example, day will filter for rule suites that occurred in the past 24 hours, and week will filter for insights that occurred in the past 7 days (168 hours).
The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.
", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "rule_suite_result", + "description": "The rule results to filter on. When specified, only suites with this result will be returned.
", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass", + "all" + ], + "default": "all" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100).
", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "id": 21, + "actor_id": 12, + "username": "octocat", + "before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d", + "after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01", + "ref": "refs/heads/i-see-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-06T08:43:03Z", + "result": "bypass" + }, + { + "id": 25, + "actor_id": 11, + "username": "not-octocat", + "before_sha": "48994e4e01ccc943624c6231f172702b82b233cc", + "after_sha": "ecfd5a1025fa271a33ca5608d089476a2df3c9a1", + "ref": "refs/heads/i-am-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-07T08:43:03Z", + "result": "pass", + "evaluation_result": "fail" + } + ], + "schema": { + "title": "Rule Suites", + "description": "Response", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the rule insight." + }, + "actor_id": { + "type": "integer", + "description": "The number that identifies the user." + }, + "actor_name": { + "type": "string", + "description": "The handle for the GitHub user account." + }, + "before_sha": { + "type": "string", + "description": "The first commit sha before the push evaluation." + }, + "after_sha": { + "type": "string", + "description": "The last commit sha in the push evaluation." + }, + "ref": { + "type": "string", + "description": "The ref name that the evaluation ran on." + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository associated with the rule evaluation." + }, + "repository_name": { + "type": "string", + "description": "The name of the repository without the `.git` extension." + }, + "pushed_at": { + "type": "string", + "format": "date-time", + "examples": [ + "2011-01-26T19:06:43Z" + ] + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass" + ], + "description": "The result of the rule evaluations for rules with the `active` enforcement status." + }, + "evaluation_result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`." + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists suites of rule evaluations at the organization level.\nFor more information, see \"Managing rulesets for repositories in your organization.\"
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/rulesets/rule-suites/{rule_suite_id}", + "title": "Get an organization rule suite", + "category": "orgs", + "subcategory": "rule-suites", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "rule_suite_id", + "description": "The unique identifier of the rule suite result.\nTo get this ID, you can use GET /repos/{owner}/{repo}/rulesets/rule-suites\nfor repositories and GET /orgs/{org}/rulesets/rule-suites\nfor organizations.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "rule_suite_id": "RULE_SUITE_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 21, + "actor_id": 12, + "username": "octocat", + "before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d", + "after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01", + "ref": "refs/heads/i-see-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-06T08:43:03Z", + "result": "bypass", + "evaluation_result": "fail", + "rule_evaluations": [ + { + "rule_source": { + "type": "ruleset", + "id": 2, + "name": "Author email must be a GitHub email address" + }, + "enforcement": "active", + "result": "pass", + "rule_type": "commit_author_email_pattern" + }, + { + "rule_source": { + "type": "protected_branch" + }, + "enforcement": "active", + "result": "fail", + "rule_type": "pull_request", + "details": "Changes must be made through a pull request." + }, + { + "rule_source": { + "type": "ruleset", + "id": 3, + "name": "Evaluate commit message pattern" + }, + "enforcement": "evaluate", + "result": "fail", + "rule_type": "commit_message_pattern" + } + ] + }, + "schema": { + "title": "Rule Suite", + "description": "Response", + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the rule insight." + }, + "actor_id": { + "type": "integer", + "description": "The number that identifies the user." + }, + "actor_name": { + "type": "string", + "description": "The handle for the GitHub user account." + }, + "before_sha": { + "type": "string", + "description": "The first commit sha before the push evaluation." + }, + "after_sha": { + "type": "string", + "description": "The last commit sha in the push evaluation." + }, + "ref": { + "type": "string", + "description": "The ref name that the evaluation ran on." + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository associated with the rule evaluation." + }, + "repository_name": { + "type": "string", + "description": "The name of the repository without the `.git` extension." + }, + "pushed_at": { + "type": "string", + "format": "date-time", + "examples": [ + "2011-01-26T19:06:43Z" + ] + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass" + ], + "description": "The result of the rule evaluations for rules with the `active` enforcement status." + }, + "evaluation_result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`." + }, + "rule_evaluations": { + "type": "array", + "description": "Details on the evaluated rules.", + "items": { + "type": "object", + "properties": { + "rule_source": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of rule source." + }, + "id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the rule source." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the rule source." + } + } + }, + "enforcement": { + "type": "string", + "enum": [ + "active", + "evaluate", + "deleted ruleset" + ], + "description": "The enforcement level of this rule source." + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the evaluation of the individual rule." + }, + "rule_type": { + "type": "string", + "description": "The type of rule." + }, + "details": { + "type": "string", + "description": "Any associated details with the rule evaluation." + } + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets information about a suite of rule evaluations from within an organization.\nFor more information, see \"Managing rulesets for repositories in your organization.\"
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + } + ], "rules": [ { "serverUrl": "https://api.github.com", @@ -504997,6 +505439,469 @@ ] } ], + "rule-suites": [ + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites", + "title": "List repository rule suites", + "category": "repos", + "subcategory": "rule-suites", + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git extension. The name is not case sensitive.
The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned.
", + "in": "query", + "schema": { + "type": "string" + }, + "x-multi-segment": true + }, + { + "name": "time_period", + "description": "The time period to filter by.
\nFor example, day will filter for rule suites that occurred in the past 24 hours, and week will filter for insights that occurred in the past 7 days (168 hours).
The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.
", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "rule_suite_result", + "description": "The rule results to filter on. When specified, only suites with this result will be returned.
", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass", + "all" + ], + "default": "all" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100).
", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "id": 21, + "actor_id": 12, + "username": "octocat", + "before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d", + "after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01", + "ref": "refs/heads/i-see-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-06T08:43:03Z", + "result": "bypass" + }, + { + "id": 25, + "actor_id": 11, + "username": "not-octocat", + "before_sha": "48994e4e01ccc943624c6231f172702b82b233cc", + "after_sha": "ecfd5a1025fa271a33ca5608d089476a2df3c9a1", + "ref": "refs/heads/i-am-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-07T08:43:03Z", + "result": "pass", + "evaluation_result": "fail" + } + ], + "schema": { + "title": "Rule Suites", + "description": "Response", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the rule insight." + }, + "actor_id": { + "type": "integer", + "description": "The number that identifies the user." + }, + "actor_name": { + "type": "string", + "description": "The handle for the GitHub user account." + }, + "before_sha": { + "type": "string", + "description": "The first commit sha before the push evaluation." + }, + "after_sha": { + "type": "string", + "description": "The last commit sha in the push evaluation." + }, + "ref": { + "type": "string", + "description": "The ref name that the evaluation ran on." + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository associated with the rule evaluation." + }, + "repository_name": { + "type": "string", + "description": "The name of the repository without the `.git` extension." + }, + "pushed_at": { + "type": "string", + "format": "date-time", + "examples": [ + "2011-01-26T19:06:43Z" + ] + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass" + ], + "description": "The result of the rule evaluations for rules with the `active` enforcement status." + }, + "evaluation_result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`." + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists suites of rule evaluations at the repository level.\nFor more information, see \"Managing rulesets for a repository.\"
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}", + "title": "Get a repository rule suite", + "category": "repos", + "subcategory": "rule-suites", + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git extension. The name is not case sensitive.
The unique identifier of the rule suite result.\nTo get this ID, you can use GET /repos/{owner}/{repo}/rulesets/rule-suites\nfor repositories and GET /orgs/{org}/rulesets/rule-suites\nfor organizations.
", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO", + "rule_suite_id": "RULE_SUITE_ID" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "id": 21, + "actor_id": 12, + "username": "octocat", + "before_sha": "893f768e172fb1bc9c5d6f3dd48557e45f14e01d", + "after_sha": "dedd88641a362b6b4ea872da4847d6131a164d01", + "ref": "refs/heads/i-see-everything", + "repository_id": 404, + "repository_name": "octo-repo", + "pushed_at": "2023-07-06T08:43:03Z", + "result": "bypass", + "evaluation_result": "fail", + "rule_evaluations": [ + { + "rule_source": { + "type": "ruleset", + "id": 2, + "name": "Author email must be a GitHub email address" + }, + "enforcement": "active", + "result": "pass", + "rule_type": "commit_author_email_pattern" + }, + { + "rule_source": { + "type": "protected_branch" + }, + "enforcement": "active", + "result": "fail", + "rule_type": "pull_request", + "details": "Changes must be made through a pull request." + }, + { + "rule_source": { + "type": "ruleset", + "id": 3, + "name": "Evaluate commit message pattern" + }, + "enforcement": "evaluate", + "result": "fail", + "rule_type": "commit_message_pattern" + } + ] + }, + "schema": { + "title": "Rule Suite", + "description": "Response", + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the rule insight." + }, + "actor_id": { + "type": "integer", + "description": "The number that identifies the user." + }, + "actor_name": { + "type": "string", + "description": "The handle for the GitHub user account." + }, + "before_sha": { + "type": "string", + "description": "The first commit sha before the push evaluation." + }, + "after_sha": { + "type": "string", + "description": "The last commit sha in the push evaluation." + }, + "ref": { + "type": "string", + "description": "The ref name that the evaluation ran on." + }, + "repository_id": { + "type": "integer", + "description": "The ID of the repository associated with the rule evaluation." + }, + "repository_name": { + "type": "string", + "description": "The name of the repository without the `.git` extension." + }, + "pushed_at": { + "type": "string", + "format": "date-time", + "examples": [ + "2011-01-26T19:06:43Z" + ] + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail", + "bypass" + ], + "description": "The result of the rule evaluations for rules with the `active` enforcement status." + }, + "evaluation_result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`." + }, + "rule_evaluations": { + "type": "array", + "description": "Details on the evaluated rules.", + "items": { + "type": "object", + "properties": { + "rule_source": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of rule source." + }, + "id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the rule source." + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "The name of the rule source." + } + } + }, + "enforcement": { + "type": "string", + "enum": [ + "active", + "evaluate", + "deleted ruleset" + ], + "description": "The enforcement level of this rule source." + }, + "result": { + "type": "string", + "enum": [ + "pass", + "fail" + ], + "description": "The result of the evaluation of the individual rule." + }, + "rule_type": { + "type": "string", + "description": "The type of rule." + }, + "details": { + "type": "string", + "description": "Any associated details with the rule evaluation." + } + } + } + } + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets information about a suite of rule evaluations from within a repository.\nFor more information, see \"Managing rulesets for a repository.\"
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "500", + "description": "Internal Error
" + } + ] + } + ], "rules": [ { "serverUrl": "https://api.github.com", diff --git a/src/rest/lib/config.json b/src/rest/lib/config.json index cc24f35a9e..21731946b5 100644 --- a/src/rest/lib/config.json +++ b/src/rest/lib/config.json @@ -36,5 +36,5 @@ ] } }, - "sha": "588349f3b71883016d36d3185aee4697ef812f41" + "sha": "ffaf232180dbaff57ce08fa5490df44bbc606501" } \ No newline at end of file diff --git a/src/webhooks/lib/config.json b/src/webhooks/lib/config.json index e2cb614872..0a079841d6 100644 --- a/src/webhooks/lib/config.json +++ b/src/webhooks/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "588349f3b71883016d36d3185aee4697ef812f41" + "sha": "ffaf232180dbaff57ce08fa5490df44bbc606501" } \ No newline at end of file From 6c1ec8068ffddf4aaa996c1516d6566d9aa07ada Mon Sep 17 00:00:00 2001 From: Rachael Sewell