From aff1396c6a3add8551d2499d2ec7d99257136c67 Mon Sep 17 00:00:00 2001 From: conco Date: Wed, 26 Nov 2025 05:03:53 +0000 Subject: [PATCH 1/3] Update .gitea/workflows/claude_assistant.yml --- .gitea/workflows/claude_assistant.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/claude_assistant.yml b/.gitea/workflows/claude_assistant.yml index dcb1158..bf42631 100644 --- a/.gitea/workflows/claude_assistant.yml +++ b/.gitea/workflows/claude_assistant.yml @@ -29,7 +29,7 @@ jobs: fetch-depth: 0 - name: Run Claude Assistant - uses: markwylde/claude-code-gitea-action + uses: markwylde/claude-code-gitea-action@v1.0.5 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} gitea_token: ${{ secrets.CLAUDE_GITEA_TOKEN }} From be62af98d3ddc9c9890f1bfcdb4bce19f15857da Mon Sep 17 00:00:00 2001 From: conco Date: Wed, 26 Nov 2025 15:19:25 +0000 Subject: [PATCH 2/3] Update .gitea/workflows/claude_assistant.yml --- .gitea/workflows/claude_assistant.yml | 43 +++++++++++++++------------ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/claude_assistant.yml b/.gitea/workflows/claude_assistant.yml index bf42631..18d981e 100644 --- a/.gitea/workflows/claude_assistant.yml +++ b/.gitea/workflows/claude_assistant.yml @@ -1,43 +1,48 @@ -name: Claude Assistant for Gitea +name: Claude PR Assistant on: - # Trigger on issue comments (works on both issues and pull requests in Gitea) issue_comment: types: [created] - # Trigger on issues being opened or assigned + pull_request_review_comment: + types: [created] issues: types: [opened, assigned] - # Note: pull_request_review_comment has limited support in Gitea - # Use issue_comment instead which covers PR comments + pull_request_review: + types: [submitted] jobs: - claude-assistant: - # Basic trigger detection - check for @claude in comments or issue body + claude-code-action: if: | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || github.event.action == 'assigned')) + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && contains(github.event.issue.body, '@claude')) runs-on: ubuntu-latest permissions: contents: write pull-requests: write issues: write - # Note: Gitea Actions may not require id-token: write for basic functionality steps: - name: Checkout repository uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 1 - - name: Run Claude Assistant - uses: markwylde/claude-code-gitea-action@v1.0.5 + - name: Run Claude PR Action + uses: anthropics/claude-code-action@beta with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} gitea_token: ${{ secrets.CLAUDE_GITEA_TOKEN }} + # Or use OAuth token instead: + # claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} timeout_minutes: "60" - trigger_phrase: "@claude" - # Optional: Customize for Gitea environment - custom_instructions: | - You are working in a Gitea environment. Be aware that: - - Some GitHub Actions features may behave differently - - Focus on core functionality and avoid advanced GitHub-specific features - - Use standard git operations when possible \ No newline at end of file + # mode: tag # Default: responds to @claude mentions + # Optional: Restrict network access to specific domains only + # experimental_allowed_domains: | + # .anthropic.com + # .github.com + # api.github.com + # .githubusercontent.com + # bun.sh + # registry.npmjs.org + # .blob.core.windows.net \ No newline at end of file From 84294455f9a3f734528a9baaf21a488ea677244f Mon Sep 17 00:00:00 2001 From: conco Date: Wed, 26 Nov 2025 15:27:14 +0000 Subject: [PATCH 3/3] Update .gitea/workflows/claude_assistant.yml --- .gitea/workflows/claude_assistant.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/claude_assistant.yml b/.gitea/workflows/claude_assistant.yml index 18d981e..445b7ee 100644 --- a/.gitea/workflows/claude_assistant.yml +++ b/.gitea/workflows/claude_assistant.yml @@ -22,6 +22,7 @@ jobs: contents: write pull-requests: write issues: write + id-token: write steps: - name: Checkout repository uses: actions/checkout@v4