(item: { raw?: string; sha?: string; toBase64?: () => Promise<string> })
| 1404 | } |
| 1405 | |
| 1406 | async uploadBlob(item: { raw?: string; sha?: string; toBase64?: () => Promise<string> }) { |
| 1407 | const contentBase64 = await result( |
| 1408 | item, |
| 1409 | 'toBase64', |
| 1410 | partial(this.toBase64, item.raw as string), |
| 1411 | ); |
| 1412 | const response = await this.request(`${this.repoURL}/git/blobs`, { |
| 1413 | method: 'POST', |
| 1414 | body: JSON.stringify({ |
| 1415 | content: contentBase64, |
| 1416 | encoding: 'base64', |
| 1417 | }), |
| 1418 | }); |
| 1419 | item.sha = response.sha; |
| 1420 | return item; |
| 1421 | } |
| 1422 | |
| 1423 | async updateTree( |
| 1424 | baseSha: string, |
no test coverage detected