-
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
[BUG]: Type ... is not assignable to type 'never' when calling requestReviewers #534
Comments
Per #528 (comment) I may have been too quick at the draw, but, the just released v9.2.0 also has this problem. |
This is a different problem than #528... This is caused by GitHub itself. The OpenAPI spec isn't quite correct for many endpoints Example endpoint: "gists/update": {
[ ... ]
requestBody: {
content: {
"application/json":
| ({
[ ... ]
files?: {
[key: string]:
| (
| ({
/** @description The new content of the file. */
content?: string;
/** @description The new filename for the file. */
filename?: string | null;
} & (
| Record<string, never>
| Record<string, never>
| Record<string, never>
))
| null
)
| undefined;
};
} & (Record<string, never> | Record<string, never>))
| null;
};
};
}; "/gists/{gist_id}": {
[ ... ]
"patch": {
"summary": "Update a gist",
"description": "Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.",
"tags": [
"gists"
],
"operationId": "gists/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists/#update-a-gist"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
[ ... ]
"files": {
[ ... ]
"type": "object",
"additionalProperties": {
"type": "object",
"nullable": true,
"properties": {
"content": {
"description": "The new content of the file.",
"type": "string"
},
"filename": {
"description": "The new filename for the file.",
"type": "string",
"nullable": true
}
},
"anyOf": [
{
"required": [
"content"
]
},
{
"required": [
"filename"
]
},
{
"type": "object",
"maxProperties": 0
}
]
}
}
},
"anyOf": [
{
"required": [
"description"
]
},
{
"required": [
"files"
]
}
],
"type": "object",
"nullable": true
},
[ ... ]
}
}
}
},
[ ... ]
}, |
I've narrowed it down to the following circumstance: The spec is trying to specify that either Before |
/cc @timrogers @nickfloyd |
I've brought it up in Slack, though I can't speculate at a time frame for resolution. |
@wolfy1339 now that your override has been merged, we should get automated dependency updates with the next lock file maintenance PRs, right? |
Sometimes, that may be the case. Most of the time updates to this package is handled by octokitbot |
I'm closing out this issue as everything seems to be in working order now. Please file a new issue if a problem arises |
What happened?
With just:
All properties of the options are flagged as errors.
You can see this at the moment in the TS playground (which does download the types): Playground Link
Versions
@octokit/types@9.1.4
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: