From a855419fc9735fd2e7a136766803ec2895444a9b Mon Sep 17 00:00:00 2001 From: jaysonv0341 Date: Mon, 13 Oct 2025 16:23:45 -0600 Subject: [PATCH] Fix: Correct secrets access in reusable workflow In reusable workflows (workflow_call), secrets need to be checked with != '' syntax, not just using && boolean logic. Also removed the unnecessary if condition on the Claude step since ANTHROPIC_API_KEY is required. --- .github/workflows/claude-review.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml index dd7822f..3551d67 100644 --- a/.github/workflows/claude-review.yml +++ b/.github/workflows/claude-review.yml @@ -44,7 +44,7 @@ jobs: # (Optional) Generate a GitHub App token for better commenting behavior - name: Generate GitHub App token id: app-token - if: ${{ secrets.APP_ID && secrets.APP_PRIVATE_KEY }} + if: ${{ secrets.APP_ID != '' && secrets.APP_PRIVATE_KEY != '' }} uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.APP_ID }} @@ -52,7 +52,6 @@ jobs: - name: Run Claude via Anthropic API - if: ${{ secrets.ANTHROPIC_API_KEY != '' }} uses: anthropics/claude-code-action-official@v1 with: github_token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}