(item: { raw?: string; sha?: string; toBase64?: () => Promise<string> })
| 1430 | } |
| 1431 | |
| 1432 | async uploadBlob(item: { raw?: string; sha?: string; toBase64?: () => Promise<string> }) { |
| 1433 | const contentBase64 = await result( |
| 1434 | item, |
| 1435 | 'toBase64', |
| 1436 | partial(this.toBase64, item.raw as string), |
| 1437 | ); |
| 1438 | const response = await this.request(`${this.repoURL}/git/blobs`, { |
| 1439 | method: 'POST', |
| 1440 | body: JSON.stringify({ |
| 1441 | content: contentBase64, |
| 1442 | encoding: 'base64', |
| 1443 | }), |
| 1444 | }); |
| 1445 | item.sha = response.sha; |
| 1446 | return item; |
| 1447 | } |
| 1448 | |
| 1449 | async updateTree( |
| 1450 | baseSha: string, |
no test coverage detected