Replies: 2 comments 2 replies
-
the response types are directly derived from GitHub's OpenAPI spec at https://github.com/github/rest-api-description/. We update our own version for @octokit at github.com/octokit/openapi where we maintain deprecations for the SDKs. From there we transpile the OpenAPI spec for api.github.com to TypeScript in https://github.com/octokit/openapi-types.ts. And finally we use that in https://github.com/octokit/types.ts/ where we maintain shared types for all the different @octokit modules. In this case, the only response for that endpoint is responses:
'302':
description: response
headers:
Location:
"$ref": "#/components/headers/location" So we don't know what type it will have after following the redirect. I'm not sure if there is a solution to it. If it is always the same response type, we could add an octokit-specific amendment as part of |
Beta Was this translation helpful? Give feedback.
-
So what is the recommended approach? Check if it's ArrayBuffer and error otherwise?
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm using nodejs and TypeScript.
octokit.actions.downloadArtifact
returns response that hasdata
property that hasunknown
type.Is that normal (the
unknown
type) or am I doing something wrong? Debugger shows it's ArrayBuffer.The problem is that I have to cast it manually to unzip it, manual casting is not nice :(
For example:
Thanks
Beta Was this translation helpful? Give feedback.
All reactions