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

Method createRef

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

Source from the content-addressed store, hash-verified

1253 }
1254
1255 async createRef(type: string, name: string, sha: string) {
1256 const result: Endpoints['POST /repos/{owner}/{repo}/git/refs']['response']['data'] =
1257 await this.request(`${this.repoURL}/git/refs`, {
1258 method: 'POST',
1259 body: JSON.stringify({ ref: `refs/${type}/${name}`, sha }),
1260 });
1261 return result;
1262 }
1263
1264 async patchRef(type: string, name: string, sha: string, opts: { force?: boolean } = {}) {
1265 const force = opts.force || false;

Callers 3

checkMetadataRefMethod · 0.95
createBranchMethod · 0.95
seedGitHubRepoFunction · 0.80

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected