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

Method getRef

packages/decap-cms-backend-azure/src/API.ts:393–403  ·  view source on GitHub ↗
(branch: string = this.branch)

Source from the content-addressed store, hash-verified

391 };
392
393 async getRef(branch: string = this.branch) {
394 const { value: refs } = await this.requestJSON<AzureArray<AzureRef>>({
395 url: `${this.endpointUrl}/refs`,
396 params: {
397 $top: '1', // There's only one ref, so keep the payload small
398 filter: 'heads/' + branch,
399 },
400 });
401
402 return refs.find(b => b.name == this.branchToRef(branch))!;
403 }
404
405 async deleteRef(ref: AzureRef): Promise<void> {
406 const deleteBranchPayload = [

Callers 2

uploadAndCommitMethod · 0.95
deleteFilesMethod · 0.95

Calls 1

findMethod · 0.80

Tested by

no test coverage detected