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

Method createCommit

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

Source from the content-addressed store, hash-verified

1544 }
1545
1546 async createCommit(
1547 message: string,
1548 treeSha: string,
1549 parents: string[],
1550 author?: GitHubAuthor,
1551 committer?: GitHubCommitter,
1552 ) {
1553 const result: Endpoints['POST /repos/{owner}/{repo}/git/commits']['response']['data'] =
1554 await this.request(`${this.repoURL}/git/commits`, {
1555 method: 'POST',
1556 body: JSON.stringify({ message, tree: treeSha, parents, author, committer }),
1557 });
1558 return result;
1559 }
1560
1561 async getUnpublishedEntrySha(collection: string, slug: string) {
1562 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