Skip to content
Merged
15 changes: 9 additions & 6 deletions .github/workflows/feature-request-enhance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
else
echo "has_enhancement=false" >> $GITHUB_OUTPUT
fi
fi

- name: Check if issue already enhanced
id: check-enhanced
run: |
Expand All @@ -42,7 +40,6 @@ jobs:
echo "Issue already has enhanced content, skipping"
else
echo "already_enhanced=false" >> $GITHUB_OUTPUT
fi

preprocess:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -96,7 +93,6 @@ jobs:
else
# Fallback to original task
echo "enhanced_task=${{ github.event.issue.title }}" >> $GITHUB_OUTPUT
fi

# Extract JSON if available
JSON_LINE=$(echo "$OUTPUT" | grep "ENHANCED_TASK_JSON:" || true)
Expand All @@ -105,7 +101,6 @@ jobs:
echo "task_json=$JSON_DATA" >> $GITHUB_OUTPUT
else
echo "task_json=null" >> $GITHUB_OUTPUT
fi

create-confluence:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -155,7 +150,6 @@ jobs:
echo "confluence_url=$CONFLUENCE_URL" >> $GITHUB_OUTPUT
else
echo "confluence_url=" >> $GITHUB_OUTPUT
fi

- name: Add Confluence link to issue
if: steps.confluence.outputs.confluence_url != ''
Expand Down Expand Up @@ -190,6 +184,7 @@ jobs:
update-github-issue:
runs-on: ubuntu-latest
needs: preprocess
if: needs.preprocess.outcome == 'success'
permissions:
contents: read
issues: write
Expand All @@ -199,6 +194,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
set -e # Exit on error

# Ensure jq is available (should be pre-installed in ubuntu-latest)
if ! command -v jq &> /dev/null; then
echo "⚠️ jq not found, installing..."
sudo apt-get update && sudo apt-get install -y jq
fi

# Read enhanced task from JSON output to avoid shell quoting issues
TASK_JSON="${{ needs.preprocess.outputs.task_json }}"

Expand Down
Loading