Skip to content

Commit

Permalink
ci: fixed gptme command error replies
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 2, 2023
1 parent 509b6a4 commit 3fb5d81
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,9 @@ jobs:
- name: Read and format log
run: |
# Assuming the log file is located at ~/.local/share/gptme/logs/<conversation name>/conversation.jsonl
LOG_FILE=~/.local/share/gptme/logs/*/conversation.jsonl
while IFS= read -r line; do
echo $(echo "$line" | jq -r '"\(.role): \(.content)"')
done < "$LOG_FILE" > log.txt
done < ~/.local/share/gptme/logs/*/conversation.jsonl > log.txt
- name: Generate commit message
run: |
Expand Down Expand Up @@ -192,9 +190,15 @@ jobs:
- name: Report error
if: failure()
env:
GITHUB_TOKEN: ${{ github.token }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
REPO_NAME: ${{ github.event.repository.name }}
USER_NAME: ${{ github.event.repository.owner.login }}
run: |
# reply to the comment that we could not fulfill the request
MESSAGE="I'm sorry, I could not fulfill your request. Please check the log output of this run for more information."
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
MESSAGE="I'm sorry, I could not fulfill your request. Please check the [log of this run]($RUN_URL) for more information."
if [[ -f log.txt ]]; then
MESSAGE+="
<detail>
Expand Down

0 comments on commit 3fb5d81

Please sign in to comment.