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

Method createEntryIssue

packages/decap-cms-backend-github/src/API.ts:1584–1602  ·  view source on GitHub ↗

* Create a GitHub issue for storing notes for a specific entry

(
    collectionName: string,
    slug: string,
    entryTitle?: string,
  )

Source from the content-addressed store, hash-verified

1582 * Create a GitHub issue for storing notes for a specific entry
1583 */
1584 async createEntryIssue(
1585 collectionName: string,
1586 slug: string,
1587 entryTitle?: string,
1588 ): Promise<GitHubIssue> {
1589 const title = `${API.NOTE_ISSUE_PREFIX}${entryTitle || `${collectionName}/${slug}`}`;
1590 const body = `This issue tracks notes for entry: \`${collectionName}/${slug}\`\n\n---\n*This issue was created automatically by Decap CMS for note management.*`;
1591
1592 const response: GitHubIssue = await this.request(`${this.repoURL}/issues`, {
1593 method: 'POST',
1594 body: JSON.stringify({
1595 title,
1596 body,
1597 labels: [API.NOTES_LABEL, `collection:${collectionName}`],
1598 }),
1599 });
1600
1601 return response;
1602 }
1603
1604 /**
1605 * List the repo's notes issues by label, not `/search/issues`, which with an

Callers 1

addNoteToEntryMethod · 0.95

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected