Skip to content

Commit 9c6be5b

Browse files
authored
ci(.github/workflows/traiage.yaml): explicitly fetch comments in gh cli invocation (coder#20288)
Closes coder/internal#1053 Updated the `gh` command to fetch issue description with explicit JSON fields and formatting. Validated with manual workflow run: https://github.com/coder/coder/actions/runs/18492815891/job/52690197479 Agent picked up additional instruction from comments: https://github.com/coder/coder/compare/cian/traiage-gh-20085-18492815891 <img width="1339" height="406" alt="Screenshot 2025-10-14 at 11 02 36" src="https://github.com/user-attachments/assets/c3daf103-3d88-4f11-b5ee-d3596912aaa8" />
1 parent 152103b commit 9c6be5b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/traiage.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ jobs:
189189
TEMPLATE_PRESET: ${{ steps.determine-inputs.outputs.template_preset }}
190190
run: |
191191
# Fetch issue description using `gh` CLI
192-
issue_description=$(gh issue view "${ISSUE_URL}")
192+
#shellcheck disable=SC2016 # The template string should not be subject to shell expansion
193+
issue_description=$(gh issue view "${ISSUE_URL}" \
194+
--json 'title,body,comments' \
195+
--template '{{printf "%s\n\n%s\n\nComments:\n" .title .body}}{{range $k, $v := .comments}} - {{index $v.author "login"}}: {{printf "%s\n" $v.body}}{{end}}')
193196
194197
# Write a prompt to PROMPT_FILE
195198
PROMPT=$(cat <<EOF

0 commit comments

Comments
 (0)