Skip to content

Commit f7bed58

Browse files
fix: PR title missing from crush review context (#52)
* fix: save PR title to /tmp before checkout so it survives actions/checkout pr_data.json was written to the working directory but actions/checkout@v4 wipes it clean. The PR body survived because it was saved to /tmp/pr_body.txt, but the title was read directly from the now-deleted pr_data.json. Fix: save the title to /tmp/pr_title.txt (like the body) and read from there. Co-Authored-By: unknown <> * Fix comment + default CRUSH_SMALL_MODEL in crush workflow --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Greg Slepak <contact@taoeffect.com>
1 parent 2b96629 commit f7bed58

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/pull-review-crush.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
env:
6565
COMMENT_BODY: ${{ github.event.comment.body }}
6666
run: |
67-
# Check for {{provider, model}} or {{provider, model, small_model}} override syntax at comment start
67+
# Check for {{provider, model}} or {{provider, model, small_model}} override syntax after /crush or /crush_fast command
6868
if [[ "$COMMENT_BODY" =~ ^[[:space:]]*/crush(_fast)?[[:space:]]+\{\{[[:space:]]*([^,]+)[[:space:]]*,[[:space:]]*([^,}]+)[[:space:]]*(,[[:space:]]*([^}]+)[[:space:]]*)?\}\} ]]; then
6969
PROVIDER=$(echo "${BASH_REMATCH[2]}" | xargs)
7070
MODEL=$(echo "${BASH_REMATCH[3]}" | xargs)
@@ -124,6 +124,7 @@ jobs:
124124
case "$REVIEW_PROVIDER" in
125125
openrouter) echo "CRUSH_SMALL_MODEL=openrouter/$SMALL_MODEL" >> "$GITHUB_ENV" ;;
126126
zai-coding-plan) echo "CRUSH_SMALL_MODEL=zai/$SMALL_MODEL" >> "$GITHUB_ENV" ;;
127+
*) echo "CRUSH_SMALL_MODEL=zai/glm-4.7" >> "$GITHUB_ENV" ;;
127128
esac
128129
129130
- name: Get PR number
@@ -141,6 +142,7 @@ jobs:
141142
echo "base_ref=$(jq -r '.base.ref' pr_data.json)"
142143
} >> "$GITHUB_OUTPUT"
143144
jq -r '.body // ""' pr_data.json > /tmp/pr_body.txt
145+
jq -r '.title // ""' pr_data.json > /tmp/pr_title.txt
144146
145147
- name: Check for linked issue
146148
id: check-issue
@@ -218,7 +220,7 @@ jobs:
218220
ISSUE_NUMBER: ${{ steps.check-issue.outputs.issue_number }}
219221
run: |
220222
# Start with PR title
221-
printf '<pr_title>\n%s\n</pr_title>\n' "$(jq -r '.title // ""' pr_data.json)" > /tmp/helpful_context.txt
223+
printf '<pr_title>\n%s\n</pr_title>\n' "$(cat /tmp/pr_title.txt)" > /tmp/helpful_context.txt
222224
223225
if [ "$HAS_ISSUE" = "true" ]; then
224226
# Fetch the issue

0 commit comments

Comments
 (0)