@@ -225,18 +225,20 @@ jobs:
225225 CLOSE_REASON : ${{ steps.parse.outputs.close_reason }}
226226 run : |
227227 ANALYSIS=$(cat /tmp/clio-workspace/analysis.json)
228- SUMMARY=$(echo "$ANALYSIS" | jq -r '.summary // "Issue closed by automated triage."')
229228
230- gh issue comment "$ISSUE_NUMBER" --body "## Automated Triage Result
231-
232- This issue has been automatically closed.
233-
234- **Reason:** ${CLOSE_REASON}
235-
236- ${SUMMARY}
237-
238- If you believe this is incorrect, please reopen the issue with additional information."
229+ {
230+ echo "## Automated Triage Result"
231+ echo ""
232+ echo "This issue has been automatically closed."
233+ echo ""
234+ echo "**Reason:** ${CLOSE_REASON}"
235+ echo ""
236+ echo "$(echo "$ANALYSIS" | jq -r '.summary // "Issue closed by automated triage."')"
237+ echo ""
238+ echo "If you believe this is incorrect, please reopen the issue with additional information."
239+ } > /tmp/clio-workspace/close_comment.md
239240
241+ gh issue comment "$ISSUE_NUMBER" --body-file /tmp/clio-workspace/close_comment.md
240242 gh issue close "$ISSUE_NUMBER" --reason "not planned" 2>/dev/null || gh issue close "$ISSUE_NUMBER"
241243
242244 - name : Handle needs-info recommendation
@@ -246,18 +248,19 @@ jobs:
246248 ISSUE_NUMBER : ${{ github.event.issue.number }}
247249 run : |
248250 ANALYSIS=$(cat /tmp/clio-workspace/analysis.json)
249- MISSING=$(echo "$ANALYSIS" | jq -r '(.missing_info // []) | map("- " + .) | join("\n")' || echo "- Additional details needed")
250- SUMMARY=$(echo "$ANALYSIS" | jq -r '.summary // "More information is needed to process this issue."')
251251
252- gh issue comment "$ISSUE_NUMBER" --body "## More Information Needed
253-
254- ${SUMMARY}
255-
256- **Please provide:**
257- ${MISSING}
258-
259- Once you've added this information, the issue will be re-evaluated."
252+ {
253+ echo "## More Information Needed"
254+ echo ""
255+ echo "$(echo "$ANALYSIS" | jq -r '.summary // "More information is needed to process this issue."')"
256+ echo ""
257+ echo "**Please provide:**"
258+ echo "$ANALYSIS" | jq -r '(.missing_info // ["Additional details needed"])[] | "- " + .'
259+ echo ""
260+ echo "Once you've added this information, the issue will be re-evaluated."
261+ } > /tmp/clio-workspace/needs_info_comment.md
260262
263+ gh issue comment "$ISSUE_NUMBER" --body-file /tmp/clio-workspace/needs_info_comment.md
261264 gh issue edit "$ISSUE_NUMBER" --add-label "needs-info" 2>/dev/null || \
262265 (gh label create "needs-info" --color "d876e3" --description "Awaiting more information from reporter" 2>/dev/null; gh issue edit "$ISSUE_NUMBER" --add-label "needs-info") || true
263266
@@ -268,22 +271,25 @@ jobs:
268271 ISSUE_NUMBER : ${{ github.event.issue.number }}
269272 run : |
270273 ANALYSIS=$(cat /tmp/clio-workspace/analysis.json)
271- SUMMARY=$(echo "$ANALYSIS" | jq -r '.summary // "Issue triaged successfully."')
272274 CLASSIFICATION=$(echo "$ANALYSIS" | jq -r '.classification // "unknown"')
273275 PRIORITY=$(echo "$ANALYSIS" | jq -r '.priority // "medium"')
274276 COMPLETENESS=$(echo "$ANALYSIS" | jq -r '.completeness // "N/A"')
275277
276- gh issue comment "$ISSUE_NUMBER" --body "## Automated Triage Summary
277-
278- | Field | Value |
279- |-------|-------|
280- | Classification | \`${CLASSIFICATION}\` |
281- | Priority | \`${PRIORITY}\` |
282- | Completeness | ${COMPLETENESS}% |
283-
284- **Analysis:** ${SUMMARY}
285-
286- _This is an automated analysis. A maintainer will review shortly._"
278+ {
279+ echo "## Automated Triage Summary"
280+ echo ""
281+ echo "| Field | Value |"
282+ echo "|-------|-------|"
283+ echo "| Classification | \`${CLASSIFICATION}\` |"
284+ echo "| Priority | \`${PRIORITY}\` |"
285+ echo "| Completeness | ${COMPLETENESS}% |"
286+ echo ""
287+ echo "**Analysis:** $(echo "$ANALYSIS" | jq -r '.summary // "Issue triaged successfully."')"
288+ echo ""
289+ echo "_This is an automated analysis. A maintainer will review shortly._"
290+ } > /tmp/clio-workspace/triage_comment.md
291+
292+ gh issue comment "$ISSUE_NUMBER" --body-file /tmp/clio-workspace/triage_comment.md
287293
288294 - name : Upload artifacts
289295 if : always()
@@ -296,4 +302,5 @@ jobs:
296302 /tmp/clio-workspace/analysis.json
297303 /tmp/clio-workspace/ISSUE_INFO.md
298304 /tmp/clio-workspace/ISSUE_BODY.md
305+ /tmp/clio-workspace/*.md
299306 retention-days : 7
0 commit comments