Skip to content

Commit

Permalink
feat: file parameter is no data for .repos.uploadReleaseAsset()
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Jan 31, 2020
1 parent d442323 commit 88d7fb5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/generated/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5460,7 +5460,8 @@ export default {
uploadReleaseAsset: {
method: "POST",
params: {
file: { mapTo: "data", required: true, type: "string | object" },
data: { mapTo: "data", required: true, type: "string | object" },
file: { alias: "data", deprecated: true, type: "string | object" },
headers: { required: true, type: "object" },
"headers.content-length": { required: true, type: "integer" },
"headers.content-type": { required: true, type: "string" },
Expand Down
24 changes: 23 additions & 1 deletion src/generated/rest-endpoint-methods-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30712,7 +30712,10 @@ export type ReposUpdateReleaseAssetParams = {
owner: string;
repo: string;
};
export type ReposUploadReleaseAssetParams = {
export type ReposUploadReleaseAssetParamsDeprecatedFile = {
/**
* @deprecated "file" parameter renamed to "data"
*/
file: string | object;
headers: ReposUploadReleaseAssetParamsHeaders;
/**
Expand All @@ -30728,6 +30731,22 @@ export type ReposUploadReleaseAssetParams = {
*/
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 @@ -38817,6 +38836,9 @@ export type RestEndpointMethods = {
* 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?: RequestParameters & ReposUploadReleaseAssetParamsDeprecatedFile
): Promise<OctokitResponse<ReposUploadReleaseAssetResponse>>;
(params?: RequestParameters & ReposUploadReleaseAssetParams): Promise<
OctokitResponse<ReposUploadReleaseAssetResponse>
>;
Expand Down

0 comments on commit 88d7fb5

Please sign in to comment.