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

Method patchRef

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

Source from the content-addressed store, hash-verified

1262 }
1263
1264 async patchRef(type: string, name: string, sha: string, opts: { force?: boolean } = {}) {
1265 const force = opts.force || false;
1266 const result: Endpoints['PATCH /repos/{owner}/{repo}/git/refs/{ref}']['response']['data'] =
1267 await this.request(`${this.repoURL}/git/refs/${type}/${encodeURIComponent(name)}`, {
1268 method: 'PATCH',
1269 body: JSON.stringify({ sha, force }),
1270 });
1271 return result;
1272 }
1273
1274 deleteRef(type: string, name: string) {
1275 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