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

Method createRef

packages/decap-cms-backend-github/src/API.ts:1216–1223  ·  view source on GitHub ↗
(type: string, name: string, sha: string)

Source from the content-addressed store, hash-verified

1214 }
1215
1216 async createRef(type: string, name: string, sha: string) {
1217 const result: Endpoints['POST /repos/{owner}/{repo}/git/refs']['response']['data'] =
1218 await this.request(`${this.repoURL}/git/refs`, {
1219 method: 'POST',
1220 body: JSON.stringify({ ref: `refs/${type}/${name}`, sha }),
1221 });
1222 return result;
1223 }
1224
1225 async patchRef(type: string, name: string, sha: string, opts: { force?: boolean } = {}) {
1226 const force = opts.force || false;

Callers 4

checkMetadataRefMethod · 0.95
createBranchMethod · 0.95
constructorMethod · 0.80
seedGitHubRepoFunction · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected