File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 2828 id : generate-diff
2929 run : |
3030 echo "Generating diff between origin/${{ github.base_ref }} and origin/${{ github.head_ref }}"
31- git diff --unified=10 origin/${{ github.base_ref }}...origin/${{ github.head_ref }} > changes.diff
31+ git diff --unified=10 origin/${{ github.base_ref }}...origin/${{ github.head_ref }} > changes.diff
32+
33+ # Check if diff is empty
34+ if [ ! -s changes.diff ]; then
35+ echo "No changes detected"
36+ echo "NO_CHANGES=true" >> $GITHUB_ENV
37+ exit 0
38+ fi
39+
40+ # Limit diff size to avoid token limits (first 100 lines)
41+ head -100 changes.diff > limited_changes.diff
42+ mv limited_changes.diff changes.diff
3243
3344 - name : Sanitize Diff
3445 run : |
5667 # Verify model is available via API
5768 echo "Verifying model availability via API..."
5869 curl -s http://localhost:11434/api/tags | jq '.'
59-
70+
71+ - name : Wait for Ollama to be ready
72+ run : |
73+ for i in {1..10}; do
74+ if curl -s http://localhost:11434/api/tags | jq '.'; then
75+ echo "Ollama is ready."
76+ break
77+ fi
78+ echo "Waiting for Ollama to be ready..."
79+ sleep 3
80+ done
81+
6082 - name : Prepare Prompt
6183 run : |
6284 DIFF=$(cat sanitized_diff.txt)
You can’t perform that action at this time.
0 commit comments