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

Method getOrCreateLabel

packages/decap-cms-backend-forgejo/src/API.ts:761–768  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

759 }
760
761 async getOrCreateLabel(name: string): Promise<ForgejoLabel> {
762 const labels = await this.getLabels();
763 const existing = labels.find(l => l.name === name);
764 if (existing) {
765 return existing;
766 }
767 return this.createLabel(name);
768 }
769
770 async setPullRequestStatus(pullRequest: ForgejoPullRequest, status: string): Promise<void> {
771 // Skip label updates for open authoring as contributors don't have permission

Callers 2

setPullRequestStatusMethod · 0.95
API.spec.jsFile · 0.80

Calls 3

getLabelsMethod · 0.95
createLabelMethod · 0.95
findMethod · 0.80

Tested by

no test coverage detected