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

Method createIssueComment

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

* Create a comment on a GitHub issue

(issueNumber: number, note: Note)

Source from the content-addressed store, hash-verified

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

Callers 1

addNoteToEntryMethod · 0.95

Calls 3

requestMethod · 0.95
formatNoteBodyFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected