diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 0ef6871..564982e 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -12,6 +12,8 @@ jobs: pull-requests: write issues: write id-token: write + env: + OVERRIDE_GITHUB_TOKEN: ${{ secrets.CLAUDE_PAT_TOKEN }} steps: # Simply checking out the repository is sufficient - the action handles the PR code - name: Checkout code @@ -19,8 +21,11 @@ jobs: with: fetch-depth: 0 # Get full history for accurate diffs + - name: Run Code Review with Claude uses: anthropics/claude-code-action@beta + env: + OVERRIDE_GITHUB_TOKEN: ${{ secrets.CLAUDE_PAT_TOKEN }} with: # Your Anthropic API key anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} diff --git a/.github/workflows/claude-comment-response.yml b/.github/workflows/claude-comment-response.yml index 3a29bf2..02a381b 100644 --- a/.github/workflows/claude-comment-response.yml +++ b/.github/workflows/claude-comment-response.yml @@ -14,6 +14,12 @@ jobs: issues: write id-token: write steps: + # Set environment variables for Claude Code Action + - name: Set up environment + run: | + echo "OVERRIDE_GITHUB_TOKEN=${{ secrets.CLAUDE_PAT_TOKEN }}" >> $GITHUB_ENV + echo "Setting up PAT token for Claude Code Action" + # Simply checking out the repository is sufficient - name: Checkout code uses: actions/checkout@v4 @@ -26,9 +32,9 @@ jobs: # Your Anthropic API key anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - # Explicitly set the trigger phrase and provide github token + # Explicitly set the trigger phrase trigger_phrase: "@claude" - github_token: ${{ secrets.GITHUB_TOKEN }} + # Note: Token is provided via OVERRIDE_GITHUB_TOKEN environment variable # Timeout for execution timeout_minutes: 20 \ No newline at end of file diff --git a/.github/workflows/claude-pr-creation.yml b/.github/workflows/claude-pr-creation.yml index a910d12..ce2f4b5 100644 --- a/.github/workflows/claude-pr-creation.yml +++ b/.github/workflows/claude-pr-creation.yml @@ -19,6 +19,12 @@ jobs: issues: write id-token: write steps: + # Set environment variables for Claude Code Action + - name: Set up environment + run: | + echo "OVERRIDE_GITHUB_TOKEN=${{ secrets.CLAUDE_PAT_TOKEN }}" >> $GITHUB_ENV + echo "Setting up PAT token for Claude Code Action" + # Simply checking out the repository is sufficient - name: Checkout code uses: actions/checkout@v4 @@ -44,7 +50,7 @@ jobs: git status git branch env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CLAUDE_PAT_TOKEN }} - name: Claude PR Creation uses: anthropics/claude-code-action@beta @@ -52,9 +58,9 @@ jobs: # Your Anthropic API key anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - # Explicitly set the trigger phrase and provide github token + # Explicitly set the trigger phrase trigger_phrase: "@claude" - github_token: ${{ secrets.GITHUB_TOKEN }} + # Note: Token is provided via OVERRIDE_GITHUB_TOKEN environment variable # Timeout for execution (longer for PR creation) timeout_minutes: 30 \ No newline at end of file