MCPcopy
hub / github.com/softprops/action-gh-release / handleUploadedAsset

Function handleUploadedAsset

src/github.ts:424–436  ·  view source on GitHub ↗
(resp: { status: number; data: any })

Source from the content-addressed store, hash-verified

422 };
423
424 const handleUploadedAsset = async (resp: { status: number; data: any }) => {
425 const json = resp.data;
426 if (resp.status !== 201) {
427 throw new Error(
428 `Failed to upload release asset ${name}. received status code ${
429 resp.status
430 }\n${json.message}\n${JSON.stringify(json.errors)}`,
431 );
432 }
433 const assetWithLabel = await maybeRestoreAssetLabel(json);
434 console.log(`✅ Uploaded ${name}`);
435 return assetWithLabel;
436 };
437
438 try {
439 return await handleUploadedAsset(await uploadAsset());

Callers 1

uploadFunction · 0.85

Calls 1

maybeRestoreAssetLabelFunction · 0.85

Tested by

no test coverage detected