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

Method findNotesIssue

packages/decap-cms-backend-github/src/API.ts:1632–1641  ·  view source on GitHub ↗
(
    collectionName: string,
    slug: string,
    state: 'open' | 'all',
  )

Source from the content-addressed store, hash-verified

1630 }
1631
1632 private async findNotesIssue(
1633 collectionName: string,
1634 slug: string,
1635 state: 'open' | 'all',
1636 ): Promise<GitHubIssue | null> {
1637 // With the backticks, so `posts/foo` does not match `posts/foo-bar`.
1638 const marker = `\`${collectionName}/${slug}\``;
1639 const issues = await this.listNotesIssues(state, collectionName);
1640 return issues.find(issue => issue.body?.includes(marker)) ?? null;
1641 }
1642
1643 /**
1644 * Find existing issue for an entry (returns null if not found)

Callers 4

findEntryIssueMethod · 0.95
closeIssueOnPublishMethod · 0.95
closeEntryNotesIssueMethod · 0.95

Calls 2

listNotesIssuesMethod · 0.95
findMethod · 0.80

Tested by

no test coverage detected