Include previous issue comments
This commit is contained in:
+9
-3
@@ -13,8 +13,14 @@ Prefer minimal, correct changes. Run relevant checks or tests if practical.
|
||||
Commit your changes locally. Do not expose secrets. Finish by reporting what
|
||||
changed and what tests ran.
|
||||
|
||||
The triggering comment body is below.
|
||||
|
||||
---
|
||||
# Comment body
|
||||
|
||||
```
|
||||
${COMMENT_BODY}
|
||||
```
|
||||
|
||||
# Full issue comment history
|
||||
|
||||
```
|
||||
${ISSUE_COMMENTS}
|
||||
```
|
||||
@@ -4,6 +4,13 @@ set -euo pipefail
|
||||
git config --global user.name bot
|
||||
git config --global user.email noreply@capsulizers.com
|
||||
|
||||
export ISSUE_COMMENTS="$(
|
||||
curl --fail-with-body --silent --show-error \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/issues/${ISSUE_INDEX}/comments?limit=100" \
|
||||
| jq -r '.[] | "## " + .user.login + " at " + .created_at + "\n\n" + .body + "\n"'
|
||||
)"
|
||||
|
||||
FINAL_PROMPT="$(envsubst < "${ACTION_PATH}/scripts/prompt.md")"
|
||||
OUTPUT_FILE="$(mktemp)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user