(item: { raw?: string; sha?: string; toBase64?: () => Promise<string> })
| 1443 | } |
| 1444 | |
| 1445 | async uploadBlob(item: { raw?: string; sha?: string; toBase64?: () => Promise<string> }) { |
| 1446 | const contentBase64 = await result( |
| 1447 | item, |
| 1448 | 'toBase64', |
| 1449 | partial(this.toBase64, item.raw as string), |
| 1450 | ); |
| 1451 | const response = await this.request(`${this.repoURL}/git/blobs`, { |
| 1452 | method: 'POST', |
| 1453 | body: JSON.stringify({ |
| 1454 | content: contentBase64, |
| 1455 | encoding: 'base64', |
| 1456 | }), |
| 1457 | }); |
| 1458 | item.sha = response.sha; |
| 1459 | return item; |
| 1460 | } |
| 1461 | |
| 1462 | async updateTree( |
| 1463 | baseSha: string, |
no test coverage detected