3030 else
3131 echo "has_enhancement=false" >> $GITHUB_OUTPUT
3232 fi
33- fi
34-
3533 - name : Check if issue already enhanced
3634 id : check-enhanced
3735 run : |
4240 echo "Issue already has enhanced content, skipping"
4341 else
4442 echo "already_enhanced=false" >> $GITHUB_OUTPUT
45- fi
4643
4744 preprocess :
4845 runs-on : ubuntu-latest
9693 else
9794 # Fallback to original task
9895 echo "enhanced_task=${{ github.event.issue.title }}" >> $GITHUB_OUTPUT
99- fi
10096
10197 # Extract JSON if available
10298 JSON_LINE=$(echo "$OUTPUT" | grep "ENHANCED_TASK_JSON:" || true)
@@ -105,7 +101,6 @@ jobs:
105101 echo "task_json=$JSON_DATA" >> $GITHUB_OUTPUT
106102 else
107103 echo "task_json=null" >> $GITHUB_OUTPUT
108- fi
109104
110105 create-confluence :
111106 runs-on : ubuntu-latest
@@ -155,7 +150,6 @@ jobs:
155150 echo "confluence_url=$CONFLUENCE_URL" >> $GITHUB_OUTPUT
156151 else
157152 echo "confluence_url=" >> $GITHUB_OUTPUT
158- fi
159153
160154 - name : Add Confluence link to issue
161155 if : steps.confluence.outputs.confluence_url != ''
@@ -190,6 +184,7 @@ jobs:
190184 update-github-issue :
191185 runs-on : ubuntu-latest
192186 needs : preprocess
187+ if : needs.preprocess.outcome == 'success'
193188 permissions :
194189 contents : read
195190 issues : write
@@ -199,6 +194,14 @@ jobs:
199194 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
200195 ISSUE_NUMBER : ${{ github.event.issue.number }}
201196 run : |
197+ set -e # Exit on error
198+
199+ # Ensure jq is available (should be pre-installed in ubuntu-latest)
200+ if ! command -v jq &> /dev/null; then
201+ echo "⚠️ jq not found, installing..."
202+ sudo apt-get update && sudo apt-get install -y jq
203+ fi
204+
202205 # Read enhanced task from JSON output to avoid shell quoting issues
203206 TASK_JSON="${{ needs.preprocess.outputs.task_json }}"
204207
0 commit comments