* Build prompt for generating acknowledgment comment
( issueTitle: string, issueBody: string, issueComments: string, labels: string )
| 89 | * Build prompt for generating acknowledgment comment |
| 90 | */ |
| 91 | function buildCommentPrompt( |
| 92 | issueTitle: string, |
| 93 | issueBody: string, |
| 94 | issueComments: string, |
| 95 | labels: string |
| 96 | ): string { |
| 97 | return `You are a friendly GitHub bot for the Kiro project. Generate a welcoming acknowledgment comment for a newly triaged issue. |
| 98 | |
| 99 | ===== ISSUE TITLE ===== |
| 100 | ${issueTitle} |
| 101 | ===== END ISSUE TITLE ===== |
| 102 | |
| 103 | ===== ISSUE BODY ===== |
| 104 | ${issueBody || "(No description provided)"} |
| 105 | ===== END ISSUE BODY ===== |
| 106 | |
| 107 | ===== EXISTING COMMENTS ===== |
| 108 | ${issueComments} |
| 109 | ===== END EXISTING COMMENTS ===== |
| 110 | |
| 111 | ===== ASSIGNED LABELS ===== |
| 112 | ${labels} |
| 113 | ===== END LABELS ===== |
| 114 | |
| 115 | TASK: |
| 116 | Write a brief, friendly acknowledgment comment (2-4 sentences) that: |
| 117 | 1. Thanks the user for opening the issue |
| 118 | 2. Briefly acknowledges what the issue is about (in 1 sentence), considering any discussion in the comments |
| 119 | 3. Mentions that a maintainer will review it shortly |
| 120 | 4. Is warm and encouraging |
| 121 | |
| 122 | RULES: |
| 123 | - Keep it concise (2-4 sentences max) |
| 124 | - Be friendly and professional |
| 125 | - Don't make promises about fixes or timelines |
| 126 | - Don't repeat the issue title verbatim |
| 127 | - Use a conversational tone |
| 128 | - End with an encouraging note |
| 129 | - If there are existing comments, acknowledge the discussion briefly |
| 130 | |
| 131 | OUTPUT: |
| 132 | Provide ONLY the comment text, no JSON, no formatting markers.`; |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Invoke Bedrock model with automatic fallback |
no outgoing calls
no test coverage detected