-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoints['PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}']['parameters'] gives broken types in version newer than v6.3.2 #283
Comments
hmm sorry for that, I thought we had the problem with the |
ah sorry I see now it's a different path, I got it |
reported the problem here: github/rest-api-description#228. Once resolved in https://github.com/github/rest-api-description, |
The original problem was resolved at github/rest-api-description#228, but now |
I'm also hitting this issue with import { Octokit } from '@octokit/core';
import { Endpoints } from '@octokit/types';
export async function updateStatusCheck(
octokit: Octokit,
checkID: number,
status: Endpoints['POST /repos/{owner}/{repo}/check-runs']['parameters']['status'],
conclusion: Endpoints['POST /repos/{owner}/{repo}/check-runs']['parameters']['conclusion'],
message: string
) {
await octokit.request(
'PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}',
{
check_run_id: checkID,
status,
completed_at: new Date().toISOString(),
conclusion,
output: {
title: 'Validation Status',
summary: message,
},
}
);
} Both
|
@wolfy1339 The Type 'unknown' is not assignable to type '"action_required" | "cancelled" | "failure" | "neutral" | "success" | "skipped" | "stale" | "timed_out" | undefined'. |
@wolfy1339, I can't reproduce this issue with the latest version: |
How to recreate the issue
Exactly same issues as: #274
Create a test project:
npm init -y && npm install typescript @octokit/types
Generates this package.json file:
Create test.ts:
Gives the following error and the type that it constructed seems very broken:
Trying with v6.3.2 works:
Diff is here:
v6.3.2...v6.4.0
The text was updated successfully, but these errors were encountered: