Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(TypeScript): file parameter is no data for `.repos.uploadRele…
…aseAsset()`
  • Loading branch information
gr2m committed Jan 31, 2020
1 parent 463e4ff commit dc2cc51
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion index.d.ts
Expand Up @@ -31840,7 +31840,10 @@ declare namespace Octokit {

repo: string;
};
export type ReposUploadReleaseAssetParams = {
export type ReposUploadReleaseAssetParamsDeprecatedFile = {
/**
* @deprecated "file" parameter renamed to "data"
*/
file: string | object;

headers: ReposUploadReleaseAssetParamsHeaders;
Expand All @@ -31857,6 +31860,23 @@ declare namespace Octokit {
*/
url: string;
};
export type ReposUploadReleaseAssetParams = {
data: string | object;

headers: ReposUploadReleaseAssetParamsHeaders;
/**
* An alternate short description of the asset. Used in place of the filename. This should be set in a URI query parameter.
*/
label?: string;
/**
* The file name of the asset. This should be set in a URI query parameter.
*/
name: string;
/**
* The `upload_url` key returned from creating or getting a release
*/
url: string;
};
export type SearchCodeParams = {
/**
* Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`.
Expand Down Expand Up @@ -40158,6 +40178,10 @@ declare class Octokit {
* GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset.
*/
uploadReleaseAsset: {
(
params?: Octokit.RequestOptions &
Octokit.ReposUploadReleaseAssetParamsDeprecatedFile
): Promise<Octokit.Response<Octokit.ReposUploadReleaseAssetResponse>>;
(
params?: Octokit.RequestOptions & Octokit.ReposUploadReleaseAssetParams
): Promise<Octokit.Response<Octokit.ReposUploadReleaseAssetResponse>>;
Expand Down

0 comments on commit dc2cc51

Please sign in to comment.