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

Method createCommit

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

Source from the content-addressed store, hash-verified

1505 }
1506
1507 async createCommit(
1508 message: string,
1509 treeSha: string,
1510 parents: string[],
1511 author?: GitHubAuthor,
1512 committer?: GitHubCommitter,
1513 ) {
1514 const result: Endpoints['POST /repos/{owner}/{repo}/git/commits']['response']['data'] =
1515 await this.request(`${this.repoURL}/git/commits`, {
1516 method: 'POST',
1517 body: JSON.stringify({ message, tree: treeSha, parents, author, committer }),
1518 });
1519 return result;
1520 }
1521
1522 async getUnpublishedEntrySha(collection: string, slug: string) {
1523 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