* Create a comment on a GitHub issue
(issueNumber: number, note: Note)
| 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 |
no test coverage detected