Skip to content

Commit 6de3a9a

Browse files
committed
Fix: Make generate-implementation independent of preprocess to avoid skipped jobs
- Remove preprocess from needs to prevent skipping when preprocess fails/is skipped - Always fetch issue data directly in generate-implementation - Ensures implementation plan is generated even if preprocess has issues
1 parent 14ae73b commit 6de3a9a

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/feature-request-enhance.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,12 @@ jobs:
256256
257257
generate-implementation:
258258
runs-on: ubuntu-latest
259-
needs: [check-label, preprocess]
260-
if: needs.preprocess.outcome == 'success'
259+
needs: [check-label]
260+
# Run if issue has enhancement label and isn't already enhanced
261+
# Don't depend on preprocess to avoid skipping if preprocess fails/is skipped
262+
if: |
263+
needs.check-label.outputs.has_enhancement == 'true' &&
264+
needs.check-label.outputs.already_enhanced == 'false'
261265
permissions:
262266
contents: write
263267
pull-requests: write
@@ -279,13 +283,31 @@ jobs:
279283
working-directory: .github/agent
280284
run: npm install
281285

286+
- name: Fetch issue data
287+
id: fetch-issue
288+
env:
289+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
290+
ISSUE_NUMBER: ${{ needs.check-label.outputs.issue_number }}
291+
run: |
292+
ISSUE_JSON=$(curl -s \
293+
-H "Authorization: token $GITHUB_TOKEN" \
294+
-H "Accept: application/vnd.github+json" \
295+
"https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUMBER")
296+
TITLE=$(echo "$ISSUE_JSON" | jq -r '.title')
297+
BODY=$(echo "$ISSUE_JSON" | jq -r '.body // ""')
298+
{
299+
echo "issue_title<<EOF"
300+
echo "$TITLE"
301+
echo "EOF"
302+
} >> "$GITHUB_OUTPUT"
303+
282304
- name: Generate implementation with Claude
283305
id: generate
284306
env:
285307
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
286308
CLAUDE_MODEL: ${{ secrets.CLAUDE_MODEL }}
287-
ENHANCED_TASK: ${{ needs.preprocess.outputs.enhanced_task }}
288-
TASK: ${{ needs.preprocess.outputs.issue_title }}
309+
ENHANCED_TASK: ${{ steps.fetch-issue.outputs.issue_title }}
310+
TASK: ${{ steps.fetch-issue.outputs.issue_title }}
289311
ISSUE_NUMBER: ${{ needs.check-label.outputs.issue_number }}
290312
run: |
291313
set -e

0 commit comments

Comments
 (0)