Skip to content

Commit

Permalink
feat: union types for check run conclusion and status (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot committed Jan 5, 2021
1 parent 78c4d13 commit 4e0abb4
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
25 changes: 22 additions & 3 deletions cache/openapi-schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi": "3.0.3",
"info": {
"version": "2.1.0",
"version": "2.2.0",
"title": "GitHub's official OpenAPI spec + Octokit extension",
"description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
"license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" },
Expand Down Expand Up @@ -18675,7 +18675,7 @@
"/repos/{owner}/{repo}/community/code_of_conduct": {
"get": {
"summary": "Get the code of conduct for a repository",
"description": "This method returns the contents of the repository's code of conduct file, if one is detected.",
"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.",
"tags": ["codes-of-conduct"],
"operationId": "codes-of-conduct/get-for-repo",
"externalDocs": {
Expand Down Expand Up @@ -18720,7 +18720,7 @@
"/repos/{owner}/{repo}/community/profile": {
"get": {
"summary": "Get community profile metrics",
"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.",
"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.",
"tags": ["repos"],
"operationId": "repos/get-community-profile-metrics",
"externalDocs": {
Expand Down Expand Up @@ -43428,6 +43428,15 @@
"conclusion": {
"type": "string",
"example": "neutral",
"enum": [
"success",
"failure",
"neutral",
"cancelled",
"skipped",
"timed_out",
"action_required"
],
"nullable": true
},
"started_at": {
Expand Down Expand Up @@ -43562,11 +43571,21 @@
"status": {
"type": "string",
"example": "completed",
"enum": ["queued", "in_progress", "completed"],
"nullable": true
},
"conclusion": {
"type": "string",
"example": "neutral",
"enum": [
"success",
"failure",
"neutral",
"cancelled",
"skipped",
"timed_out",
"action_required"
],
"nullable": true
},
"url": {
Expand Down
36 changes: 32 additions & 4 deletions generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12258,7 +12258,9 @@ export interface operations {
};
};
/**
* This method returns the contents of the repository's code of conduct file, if one is detected.
* Returns the contents of the repository's code of conduct file, if one is detected.
*
* 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.
*/
"codes-of-conduct/get-for-repo": {
parameters: {
Expand All @@ -12282,6 +12284,12 @@ export interface operations {
* code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,
* README, and CONTRIBUTING files.
*
* The `health_percentage` score is defined as a percentage of how many of
* these four documents are present: README, CONTRIBUTING, LICENSE, and
* CODE_OF_CONDUCT. For example, if all four documents are present, then
* the `health_percentage` is `100`. If only one is present, then the
* `health_percentage` is `25`.
*
* `content_reports_enabled` is only returned for organization-owned repositories.
*/
"repos/get-community-profile-metrics": {
Expand Down Expand Up @@ -25372,7 +25380,17 @@ export interface components {
* The phase of the lifecycle that the check is currently in.
*/
status: "queued" | "in_progress" | "completed";
conclusion: string | null;
conclusion:
| (
| "success"
| "failure"
| "neutral"
| "cancelled"
| "skipped"
| "timed_out"
| "action_required"
)
| null;
started_at: string | null;
completed_at: string | null;
output: {
Expand Down Expand Up @@ -25416,8 +25434,18 @@ export interface components {
* The SHA of the head commit that is being checked.
*/
head_sha: string;
status: string | null;
conclusion: string | null;
status: ("queued" | "in_progress" | "completed") | null;
conclusion:
| (
| "success"
| "failure"
| "neutral"
| "cancelled"
| "skipped"
| "timed_out"
| "action_required"
)
| null;
url: string | null;
before: string | null;
after: string | null;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"branches": "main"
},
"octokit": {
"openapi-version": "2.1.0"
"openapi-version": "2.2.0"
}
}

0 comments on commit 4e0abb4

Please sign in to comment.