From c5e1cd9c8d0f4fffae3a19b6972038ad3343deaf Mon Sep 17 00:00:00 2001 From: stranske Date: Wed, 7 Jan 2026 11:20:07 +0000 Subject: [PATCH] fix: Add PYTHONPATH to issue optimizer analyze steps - Add PYTHONPATH to analyze and dedup steps for tools module import - Fix long lines that exceed 100 characters --- .../workflows/agents-issue-optimizer.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml b/templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml index 277022de9..c7087db26 100644 --- a/templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml +++ b/templates/consumer-repo/.github/workflows/agents-issue-optimizer.yml @@ -101,6 +101,7 @@ jobs: ISSUE_NUMBER: ${{ steps.check.outputs.issue_number }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + PYTHONPATH: ${{ github.workspace }} run: | echo "Running analysis on issue #${ISSUE_NUMBER}" python scripts/langchain/issue_optimizer.py \ @@ -138,7 +139,8 @@ jobs: # Post comment gh issue comment "${ISSUE_NUMBER}" --body-file /tmp/comment.md - echo "Analysis complete. Review suggestions and add 'agents:apply-suggestions' label to apply." + echo "Analysis complete. Review suggestions and add" + echo "'agents:apply-suggestions' label to apply." - name: Advisory issue dedup check if: steps.check.outputs.should_run == 'true' && steps.check.outputs.phase == 'analyze' @@ -147,10 +149,15 @@ jobs: ISSUE_NUMBER: ${{ steps.check.outputs.issue_number }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + PYTHONPATH: ${{ github.workspace }} run: | echo "Checking for potential duplicate issues (advisory)" - gh api "repos/${{ github.repository }}/issues?state=open&per_page=100" --paginate > /tmp/open_issues.json - gh api "repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/comments" --paginate > /tmp/dedup_comments.json + gh api \ + "repos/${{ github.repository }}/issues?state=open&per_page=100" \ + --paginate > /tmp/open_issues.json + gh api \ + "repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/comments" \ + --paginate > /tmp/dedup_comments.json python - <<'PY' || true import json @@ -201,10 +208,12 @@ jobs: ISSUE_NUMBER: ${{ steps.check.outputs.issue_number }} GH_TOKEN: ${{ github.token }} run: | - echo "Extracting suggestions from comments on issue #${ISSUE_NUMBER}" + echo \"Extracting suggestions from comments on issue #${ISSUE_NUMBER}\" # Get all comments and find the one with suggestions JSON - gh api "repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/comments" --paginate > /tmp/comments.json + gh api \ + \"repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/comments\" \ + --paginate > /tmp/comments.json # Extract suggestions JSON from comment python -c "