* Send a message to a GitHub issue or PR
(conversationId: string, message: string)
| 64 | * Send a message to a GitHub issue or PR |
| 65 | */ |
| 66 | async sendMessage(conversationId: string, message: string): Promise<void> { |
| 67 | const parsed = this.parseConversationId(conversationId); |
| 68 | if (!parsed) { |
| 69 | console.error('[GitHub] Invalid conversationId:', conversationId); |
| 70 | return; |
| 71 | } |
| 72 | |
| 73 | try { |
| 74 | await this.octokit.rest.issues.createComment({ |
| 75 | owner: parsed.owner, |
| 76 | repo: parsed.repo, |
| 77 | issue_number: parsed.number, |
| 78 | body: message, |
| 79 | }); |
| 80 | console.log(`[GitHub] Comment posted to ${conversationId}`); |
| 81 | } catch (error) { |
| 82 | console.error('[GitHub] Failed to post comment:', { error, conversationId }); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Get streaming mode (always batch for GitHub to avoid comment spam) |
no test coverage detected