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

Method createCommit

packages/decap-cms-backend-github/src/API.ts:1533–1546  ·  view source on GitHub ↗
(
    message: string,
    treeSha: string,
    parents: string[],
    author?: GitHubAuthor,
    committer?: GitHubCommitter,
  )

Source from the content-addressed store, hash-verified

1531 }
1532
1533 async createCommit(
1534 message: string,
1535 treeSha: string,
1536 parents: string[],
1537 author?: GitHubAuthor,
1538 committer?: GitHubCommitter,
1539 ) {
1540 const result: Endpoints['POST /repos/{owner}/{repo}/git/commits']['response']['data'] =
1541 await this.request(`${this.repoURL}/git/commits`, {
1542 method: 'POST',
1543 body: JSON.stringify({ message, tree: treeSha, parents, author, committer }),
1544 });
1545 return result;
1546 }
1547
1548 async getUnpublishedEntrySha(collection: string, slug: string) {
1549 const contentKey = this.generateContentKey(collection, slug);

Callers 2

rebaseSingleCommitMethod · 0.95
commitMethod · 0.95

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected