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

Method patchRef

packages/decap-cms-backend-github/src/API.ts:1251–1259  ·  view source on GitHub ↗
(type: string, name: string, sha: string, opts: { force?: boolean } = {})

Source from the content-addressed store, hash-verified

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

Callers 3

storeMetadataMethod · 0.95
deleteMetadataMethod · 0.95
patchBranchMethod · 0.95

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected