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

Method getOrCreateLabel

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

Source from the content-addressed store, hash-verified

752 }
753
754 async getOrCreateLabel(name: string): Promise<ForgejoLabel> {
755 const labels = await this.getLabels();
756 const existing = labels.find(l => l.name === name);
757 if (existing) {
758 return existing;
759 }
760 return this.createLabel(name);
761 }
762
763 async setPullRequestStatus(pullRequest: ForgejoPullRequest, status: string): Promise<void> {
764 // 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