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

Method createRef

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

Source from the content-addressed store, hash-verified

1240 }
1241
1242 async createRef(type: string, name: string, sha: string) {
1243 const result: Endpoints['POST /repos/{owner}/{repo}/git/refs']['response']['data'] =
1244 await this.request(`${this.repoURL}/git/refs`, {
1245 method: 'POST',
1246 body: JSON.stringify({ ref: `refs/${type}/${name}`, sha }),
1247 });
1248 return result;
1249 }
1250
1251 async patchRef(type: string, name: string, sha: string, opts: { force?: boolean } = {}) {
1252 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