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

Method createIssueComment

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

* Create a comment on a GitHub issue

(issueNumber: number, note: Note)

Source from the content-addressed store, hash-verified

1747 * Create a comment on a GitHub issue
1748 */
1749 async createIssueComment(issueNumber: number, note: Note): Promise<string> {
1750 try {
1751 const response: GitHubIssue = await this.request(
1752 `${this.repoURL}/issues/${issueNumber}/comments`,
1753 {
1754 method: 'POST',
1755 body: JSON.stringify({
1756 body: this.formatNoteForGithub(note),
1757 }),
1758 },
1759 );
1760
1761 return response.id.toString();
1762 } catch (error) {
1763 console.error('Failed to create issue comment:', error);
1764 throw new APIError('Failed to create note', error.status || 500, API_NAME);
1765 }
1766 }
1767
1768 /**
1769 * Update a GitHub issue comment

Callers 1

addNoteToEntryMethod · 0.95

Calls 3

requestMethod · 0.95
formatNoteForGithubMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected