Answer @claude mentions on issues and PRs, including PRs from forks
This commit is contained in:
parent
6137034d2b
commit
a2213b6610
1 changed files with 35 additions and 0 deletions
35
.github/workflows/claude.yml
vendored
Normal file
35
.github/workflows/claude.yml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
name: Claude
|
||||||
|
|
||||||
|
# Comment "@claude ..." on an issue or PR (for example "@claude review this
|
||||||
|
# against CLAUDE.md") and Claude answers in the thread. Comment events run in
|
||||||
|
# this repo's context, so this also works on PRs from forks, where secrets are
|
||||||
|
# otherwise withheld. Only people with write access can trigger it.
|
||||||
|
# Needs the Claude GitHub app and a CLAUDE_CODE_OAUTH_TOKEN secret (claude setup-token).
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
pull_request_review_comment:
|
||||||
|
types: [created]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
claude:
|
||||||
|
if: >-
|
||||||
|
(github.event_name != 'pull_request_review' && contains(github.event.comment.body, '@claude')) ||
|
||||||
|
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude'))
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
issues: write
|
||||||
|
id-token: write
|
||||||
|
actions: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- uses: anthropics/claude-code-action@v1
|
||||||
|
with:
|
||||||
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue