MCPcopy Create free account
hub / github.com/decaporg/decap-cms / createTree

Method createTree

packages/decap-cms-backend-github/src/API.ts:1519–1526  ·  view source on GitHub ↗
(baseSha: string, tree: TreeEntry[])

Source from the content-addressed store, hash-verified

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] : [];

Callers 1

updateTreeMethod · 0.95

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected