Skip to content

Commit 4e0abb4

Browse files
authored
feat: union types for check run conclusion and status (#20)
1 parent 78c4d13 commit 4e0abb4

File tree

3 files changed

+55
-8
lines changed

3 files changed

+55
-8
lines changed

cache/openapi-schema.json

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.3",
33
"info": {
4-
"version": "2.1.0",
4+
"version": "2.2.0",
55
"title": "GitHub's official OpenAPI spec + Octokit extension",
66
"description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
77
"license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" },
@@ -18675,7 +18675,7 @@
1867518675
"/repos/{owner}/{repo}/community/code_of_conduct": {
1867618676
"get": {
1867718677
"summary": "Get the code of conduct for a repository",
18678-
"description": "This method returns the contents of the repository's code of conduct file, if one is detected.",
18678+
"description": "Returns the contents of the repository's code of conduct file, if one is detected.\n\nA code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching.",
1867918679
"tags": ["codes-of-conduct"],
1868018680
"operationId": "codes-of-conduct/get-for-repo",
1868118681
"externalDocs": {
@@ -18720,7 +18720,7 @@
1872018720
"/repos/{owner}/{repo}/community/profile": {
1872118721
"get": {
1872218722
"summary": "Get community profile metrics",
18723-
"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.",
18723+
"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\nThe `health_percentage` score is defined as a percentage of how many of\nthese four documents are present: README, CONTRIBUTING, LICENSE, and\nCODE_OF_CONDUCT. For example, if all four documents are present, then\nthe `health_percentage` is `100`. If only one is present, then the\n`health_percentage` is `25`.\n\n`content_reports_enabled` is only returned for organization-owned repositories.",
1872418724
"tags": ["repos"],
1872518725
"operationId": "repos/get-community-profile-metrics",
1872618726
"externalDocs": {
@@ -43428,6 +43428,15 @@
4342843428
"conclusion": {
4342943429
"type": "string",
4343043430
"example": "neutral",
43431+
"enum": [
43432+
"success",
43433+
"failure",
43434+
"neutral",
43435+
"cancelled",
43436+
"skipped",
43437+
"timed_out",
43438+
"action_required"
43439+
],
4343143440
"nullable": true
4343243441
},
4343343442
"started_at": {
@@ -43562,11 +43571,21 @@
4356243571
"status": {
4356343572
"type": "string",
4356443573
"example": "completed",
43574+
"enum": ["queued", "in_progress", "completed"],
4356543575
"nullable": true
4356643576
},
4356743577
"conclusion": {
4356843578
"type": "string",
4356943579
"example": "neutral",
43580+
"enum": [
43581+
"success",
43582+
"failure",
43583+
"neutral",
43584+
"cancelled",
43585+
"skipped",
43586+
"timed_out",
43587+
"action_required"
43588+
],
4357043589
"nullable": true
4357143590
},
4357243591
"url": {

generated/types.ts

+32-4
Original file line numberDiff line numberDiff line change
@@ -12258,7 +12258,9 @@ export interface operations {
1225812258
};
1225912259
};
1226012260
/**
12261-
* This method returns the contents of the repository's code of conduct file, if one is detected.
12261+
* Returns the contents of the repository's code of conduct file, if one is detected.
12262+
*
12263+
* A code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching.
1226212264
*/
1226312265
"codes-of-conduct/get-for-repo": {
1226412266
parameters: {
@@ -12282,6 +12284,12 @@ export interface operations {
1228212284
* code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,
1228312285
* README, and CONTRIBUTING files.
1228412286
*
12287+
* The `health_percentage` score is defined as a percentage of how many of
12288+
* these four documents are present: README, CONTRIBUTING, LICENSE, and
12289+
* CODE_OF_CONDUCT. For example, if all four documents are present, then
12290+
* the `health_percentage` is `100`. If only one is present, then the
12291+
* `health_percentage` is `25`.
12292+
*
1228512293
* `content_reports_enabled` is only returned for organization-owned repositories.
1228612294
*/
1228712295
"repos/get-community-profile-metrics": {
@@ -25372,7 +25380,17 @@ export interface components {
2537225380
* The phase of the lifecycle that the check is currently in.
2537325381
*/
2537425382
status: "queued" | "in_progress" | "completed";
25375-
conclusion: string | null;
25383+
conclusion:
25384+
| (
25385+
| "success"
25386+
| "failure"
25387+
| "neutral"
25388+
| "cancelled"
25389+
| "skipped"
25390+
| "timed_out"
25391+
| "action_required"
25392+
)
25393+
| null;
2537625394
started_at: string | null;
2537725395
completed_at: string | null;
2537825396
output: {
@@ -25416,8 +25434,18 @@ export interface components {
2541625434
* The SHA of the head commit that is being checked.
2541725435
*/
2541825436
head_sha: string;
25419-
status: string | null;
25420-
conclusion: string | null;
25437+
status: ("queued" | "in_progress" | "completed") | null;
25438+
conclusion:
25439+
| (
25440+
| "success"
25441+
| "failure"
25442+
| "neutral"
25443+
| "cancelled"
25444+
| "skipped"
25445+
| "timed_out"
25446+
| "action_required"
25447+
)
25448+
| null;
2542125449
url: string | null;
2542225450
before: string | null;
2542325451
after: string | null;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"branches": "main"
2424
},
2525
"octokit": {
26-
"openapi-version": "2.1.0"
26+
"openapi-version": "2.2.0"
2727
}
2828
}

0 commit comments

Comments
 (0)