From 433c43a09eeca1fbca4c864104bccc745de2b60f Mon Sep 17 00:00:00 2001 From: Joshua <62268199+minimalsm@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:07:09 +0100 Subject: [PATCH] Add claude github action --- .github/workflows/claude.yml | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/claude.yml diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 00000000000..242d90d8f31 --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,52 @@ +name: Claude PR Assistant + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + +jobs: + claude-code-action: + if: | + ( + github.event_name == 'issue_comment' && + contains(github.event.comment.body, '@claude') && + contains('minimalsm,pettinarip,wackerow,corwintines', github.event.comment.user.login) + ) || + ( + github.event_name == 'pull_request_review_comment' && + contains(github.event.comment.body, '@claude') && + contains('minimalsm,pettinarip,wackerow,corwintines', github.event.comment.user.login) + ) || + ( + github.event_name == 'pull_request_review' && + contains(github.event.review.body, '@claude') && + contains('minimalsm,pettinarip,wackerow,corwintines', github.event.review.user.login) + ) || + ( + github.event_name == 'issues' && + contains(github.event.issue.body, '@claude') && + contains('minimalsm,pettinarip,wackerow,corwintines', github.event.issue.user.login) + ) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude PR Action + uses: anthropics/claude-code-action@beta + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + timeout_minutes: "60" \ No newline at end of file