(baseSha: string, tree: TreeEntry[])
| 1517 | } |
| 1518 | |
| 1519 | async createTree(baseSha: string, tree: TreeEntry[]) { |
| 1520 | const result: Endpoints['POST /repos/{owner}/{repo}/git/trees']['response']['data'] = |
| 1521 | await this.request(`${this.repoURL}/git/trees`, { |
| 1522 | method: 'POST', |
| 1523 | body: JSON.stringify({ base_tree: baseSha, tree }), |
| 1524 | }); |
| 1525 | return result; |
| 1526 | } |
| 1527 | |
| 1528 | commit(message: string, changeTree: { parentSha?: string; sha: string }) { |
| 1529 | const parents = changeTree.parentSha ? [changeTree.parentSha] : []; |