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

Method patchRef

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

Source from the content-addressed store, hash-verified

1223 }
1224
1225 async patchRef(type: string, name: string, sha: string, opts: { force?: boolean } = {}) {
1226 const force = opts.force || false;
1227 const result: Endpoints['PATCH /repos/{owner}/{repo}/git/refs/{ref}']['response']['data'] =
1228 await this.request(`${this.repoURL}/git/refs/${type}/${encodeURIComponent(name)}`, {
1229 method: 'PATCH',
1230 body: JSON.stringify({ sha, force }),
1231 });
1232 return result;
1233 }
1234
1235 deleteRef(type: string, name: string) {
1236 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