From 4fbf5c6b5381b9cc2997f25879368e4f16d01aa8 Mon Sep 17 00:00:00 2001 From: Angel Beltran Date: Fri, 21 Aug 2026 01:44:11 -0600 Subject: [PATCH] new gitea-claude workflow --- .gitea/workflows/gitea-claude.yaml | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .gitea/workflows/gitea-claude.yaml diff --git a/.gitea/workflows/gitea-claude.yaml b/.gitea/workflows/gitea-claude.yaml new file mode 100644 index 0000000..59276d3 --- /dev/null +++ b/.gitea/workflows/gitea-claude.yaml @@ -0,0 +1,50 @@ +name: Claude Assistant for Gitea + +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 + issues: + types: [opened, assigned] + # Note: pull_request_review_comment has limited support in Gitea + # Use issue_comment instead which covers PR comments + +jobs: + claude-assistant: + # Basic trigger detection - check for @claude in comments or issue body + 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')) + 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 + + - name: Run Claude Assistant + uses: markwylde/claude-code-gitea-action + with: + gitea_api_url: "https://gitea.inventory-plus-plus.com/api/v1" + gitea_token: ${{ secrets.GITEA_TOKEN }} # Use standard workflow token + # anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + # Prefer claude_code_oauth_token over anthropic_api_key (cheaper!) + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + timeout_minutes: "60" + trigger_phrase: "@claude" + # might be nice to have this one day + # assignee_trigger: "@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 + env: + GITEA_SERVER_URL: "https://gitea.inventory-plus-plus.com"