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

Method createTree

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

Source from the content-addressed store, hash-verified

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

Callers 1

updateTreeMethod · 0.95

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected