Add pull_request trigger for required workflow ruleset

Required workflows via rulesets need a pull_request trigger directly.
Falls back to org secret when not called via workflow_call.
This commit is contained in:
Adam Moussa 2026-05-06 20:01:41 -04:00
parent 0da9b01905
commit b305a4a887

View file

@ -1,6 +1,8 @@
name: Claude Code Review name: Claude Code Review
on: on:
pull_request:
types: [opened, synchronize]
workflow_call: workflow_call:
secrets: secrets:
anthropic_api_key: anthropic_api_key:
@ -22,7 +24,7 @@ jobs:
- uses: anthropics/claude-code-action@v1 - uses: anthropics/claude-code-action@v1
with: with:
anthropic_api_key: ${{ secrets.anthropic_api_key }} anthropic_api_key: ${{ secrets.anthropic_api_key || secrets.ANTHROPIC_API_KEY }}
prompt: | prompt: |
Review this pull request. Focus on: Review this pull request. Focus on:
- Code correctness and potential bugs - Code correctness and potential bugs