(baseSha: string, tree: TreeEntry[])
| 1530 | } |
| 1531 | |
| 1532 | async createTree(baseSha: string, tree: TreeEntry[]) { |
| 1533 | const result: Endpoints['POST /repos/{owner}/{repo}/git/trees']['response']['data'] = |
| 1534 | await this.request(`${this.repoURL}/git/trees`, { |
| 1535 | method: 'POST', |
| 1536 | body: JSON.stringify({ base_tree: baseSha, tree }), |
| 1537 | }); |
| 1538 | return result; |
| 1539 | } |
| 1540 | |
| 1541 | commit(message: string, changeTree: { parentSha?: string; sha: string }) { |
| 1542 | const parents = changeTree.parentSha ? [changeTree.parentSha] : []; |