Skip to content

Commit

Permalink
fix: check run and gist types for body parameters (#60)
Browse files Browse the repository at this point in the history
* build(deps): update `octokit-openapi` to [v3.0.3](https://github.com/drwpow/openapi-typescript/releases/tag/v3.0.3)

* fix: check run and gist types for body parameters

addresses octokit/types.ts#274
  • Loading branch information
gr2m committed Mar 2, 2021
1 parent 1cf0abe commit 39d802a
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 11 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@pika/plugin-build-node": "^0.9.2",
"@pika/plugin-build-web": "^0.9.2",
"@pika/plugin-ts-standard-pkg": "^0.9.2",
"openapi-typescript": "^3.0.2",
"openapi-typescript": "^3.0.3",
"pika-plugin-merge-properties": "^1.0.6",
"semantic-release-plugin-update-version-in-files": "^1.1.0",
"typescript": "^4.1.5"
Expand Down
179 changes: 172 additions & 7 deletions src/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12262,7 +12262,17 @@ export interface operations {
requestBody: {
content: {
"application/json":
| (Partial<{ [key: string]: any }> & Partial<{ [key: string]: any }>)
| ((Partial<{ [key: string]: any }> &
Partial<{ [key: string]: any }>) & {
/** Description of the gist */
description?: string;
/** Names of files to be updated */
files?: {
[key: string]: Partial<{ [key: string]: any }> &
Partial<{ [key: string]: any }> &
Partial<{ [key: string]: any }>;
};
})
| null;
};
};
Expand Down Expand Up @@ -19857,7 +19867,7 @@ export interface operations {
};
requestBody: {
content: {
"application/json": Partial<
"application/json": (Partial<
{
status?: "completed";
} & { [key: string]: any }
Expand All @@ -19866,7 +19876,83 @@ export interface operations {
{
status?: "queued" | "in_progress";
} & { [key: string]: any }
>;
>) & {
/** The name of the check. For example, "code-coverage". */
name: string;
/** The SHA of the commit. */
head_sha: string;
/** The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */
details_url?: string;
/** A reference for the run on the integrator's system. */
external_id?: string;
/** The current status. Can be one of `queued`, `in_progress`, or `completed`. */
status?: "queued" | "in_progress" | "completed";
/** The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
started_at?: string;
/**
* **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`.
* **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.
*/
conclusion?:
| "action_required"
| "cancelled"
| "failure"
| "neutral"
| "success"
| "skipped"
| "stale"
| "timed_out";
/** The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
completed_at?: string;
/** Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description. */
output?: {
/** The title of the check run. */
title: string;
/** The summary of the check run. This parameter supports Markdown. */
summary: string;
/** The details of the check run. This parameter supports Markdown. */
text?: string;
/** Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://help.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */
annotations?: {
/** The path of the file to add an annotation to. For example, `assets/css/main.css`. */
path: string;
/** The start line of the annotation. */
start_line: number;
/** The end line of the annotation. */
end_line: number;
/** The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */
start_column?: number;
/** The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */
end_column?: number;
/** The level of the annotation. Can be one of `notice`, `warning`, or `failure`. */
annotation_level: "notice" | "warning" | "failure";
/** A short description of the feedback for these lines of code. The maximum size is 64 KB. */
message: string;
/** The title that represents the annotation. The maximum size is 255 characters. */
title?: string;
/** Details about this annotation. The maximum size is 64 KB. */
raw_details?: string;
}[];
/** Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */
images?: {
/** The alternative text for the image. */
alt: string;
/** The full URL of the image. */
image_url: string;
/** A short image description. */
caption?: string;
}[];
};
/** Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */
actions?: {
/** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */
label: string;
/** A short explanation of what this action would do. The maximum size is 40 characters. */
description: string;
/** A reference for the action on the integrator's system. The maximum size is 20 characters. */
identifier: string;
}[];
};
};
};
};
Expand Down Expand Up @@ -19917,7 +20003,7 @@ export interface operations {
};
requestBody: {
content: {
"application/json": Partial<
"application/json": (Partial<
{
status?: "completed";
} & { [key: string]: any }
Expand All @@ -19926,7 +20012,81 @@ export interface operations {
{
status?: "queued" | "in_progress";
} & { [key: string]: any }
>;
>) & {
/** The name of the check. For example, "code-coverage". */
name?: string;
/** The URL of the integrator's site that has the full details of the check. */
details_url?: string;
/** A reference for the run on the integrator's system. */
external_id?: string;
/** This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
started_at?: string;
/** The current status. Can be one of `queued`, `in_progress`, or `completed`. */
status?: "queued" | "in_progress" | "completed";
/**
* **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`.
* **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.
*/
conclusion?:
| "action_required"
| "cancelled"
| "failure"
| "neutral"
| "success"
| "skipped"
| "stale"
| "timed_out";
/** The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */
completed_at?: string;
/** Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description. */
output?: {
/** **Required**. */
title?: string;
/** Can contain Markdown. */
summary: string;
/** Can contain Markdown. */
text?: string;
/** Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://help.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */
annotations?: {
/** The path of the file to add an annotation to. For example, `assets/css/main.css`. */
path: string;
/** The start line of the annotation. */
start_line: number;
/** The end line of the annotation. */
end_line: number;
/** The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */
start_column?: number;
/** The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */
end_column?: number;
/** The level of the annotation. Can be one of `notice`, `warning`, or `failure`. */
annotation_level: "notice" | "warning" | "failure";
/** A short description of the feedback for these lines of code. The maximum size is 64 KB. */
message: string;
/** The title that represents the annotation. The maximum size is 255 characters. */
title?: string;
/** Details about this annotation. The maximum size is 64 KB. */
raw_details?: string;
}[];
/** Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */
images?: {
/** The alternative text for the image. */
alt: string;
/** The full URL of the image. */
image_url: string;
/** A short image description. */
caption?: string;
}[];
};
/** Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */
actions?: {
/** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */
label: string;
/** A short explanation of what this action would do. The maximum size is 40 characters. */
description: string;
/** A reference for the action on the integrator's system. The maximum size is 20 characters. */
identifier: string;
}[];
};
};
};
};
Expand Down Expand Up @@ -25465,8 +25625,13 @@ export interface operations {
};
requestBody: {
content: {
"application/json": Partial<{ [key: string]: any }> &
Partial<{ [key: string]: any }>;
"application/json": (Partial<{ [key: string]: any }> &
Partial<{ [key: string]: any }>) & {
/** An array of user `login`s that will be requested. */
reviewers?: string[];
/** An array of team `slug`s that will be requested. */
team_reviewers?: string[];
};
};
};
};
Expand Down

0 comments on commit 39d802a

Please sign in to comment.