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

Method getRef

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

Source from the content-addressed store, hash-verified

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

Callers 2

uploadAndCommitMethod · 0.95
deleteFilesMethod · 0.95

Calls 1

findMethod · 0.80

Tested by

no test coverage detected