From 7ddf89ebfb13aa826df727864ec75d95dd4853a1 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Roth Date: Mon, 4 May 2026 18:07:44 +0200 Subject: [PATCH] Initial commit --- .gitea/workflows/claude.yml | 70 ++++++++++++++++++++++++++++++++++ .gitignore | 76 +++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 .gitea/workflows/claude.yml create mode 100644 .gitignore diff --git a/.gitea/workflows/claude.yml b/.gitea/workflows/claude.yml new file mode 100644 index 0000000..2346b10 --- /dev/null +++ b/.gitea/workflows/claude.yml @@ -0,0 +1,70 @@ +name: Claude Assistant +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] +jobs: + claude-response: + runs-on: ubuntu-latest + if: | + (github.actor == 'dodox') && ( + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || + (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')) + ) + steps: + - uses: actions/checkout@v4 + - uses: markwylde/claude-code-gitea-action@gitea + with: + model: claude-sonnet-4-6 + allowed_tools: | + Bash + claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }} + gitea_token: ${{ secrets.CLAUDE_USER_GITEA_TOKEN }} + claude_git_name: Claude + claude_git_email: claude_code@dominik-roth.eu + trigger_phrase: "@claude" + + opus-response: + runs-on: ubuntu-latest + if: | + (github.actor == 'dodox') && ( + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@opus')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@opus')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@opus')) || + (github.event_name == 'issues' && contains(github.event.issue.body, '@opus')) + ) + steps: + - uses: actions/checkout@v4 + - uses: markwylde/claude-code-gitea-action@gitea + with: + model: claude-opus-4-6 + allowed_tools: | + Bash + claude_code_oauth_token: ${{ secrets.CLAUDE_CREDENTIALS }} + gitea_token: ${{ secrets.CLAUDE_USER_GITEA_TOKEN }} + claude_git_name: Claude + claude_git_email: claude_code@dominik-roth.eu + trigger_phrase: "@opus" + + access-denied: + runs-on: ubuntu-latest + if: | + (github.actor != 'dodox') && ( + (github.event_name == 'issue_comment' && (contains(github.event.comment.body, '@claude') || contains(github.event.comment.body, '@opus'))) || + (github.event_name == 'pull_request_review_comment' && (contains(github.event.comment.body, '@claude') || contains(github.event.comment.body, '@opus'))) || + (github.event_name == 'pull_request_review' && (contains(github.event.review.body, '@claude') || contains(github.event.review.body, '@opus'))) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.body, '@opus'))) + ) + steps: + - name: Access denied - only dodox can use Claude + run: | + echo "❌ Access Denied: User '${{ github.actor }}' is not authorized to use Claude" + echo "Only the repository owner 'dodox' can use the @claude or @opus assistant to prevent quota abuse" + exit 1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c86897 --- /dev/null +++ b/.gitignore @@ -0,0 +1,76 @@ +# cust +./*.csv + +# Allow test fixture data +!tests/fixtures/data/ + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# Virtual Environment +venv/ +ENV/ +env/ +.venv/ + +# Flask specific +instance/ +.webassets-cache +*.log + +# SQLite database files +*.sqlite3 +*.db + +# Migrations +migrations/ + +# Environment variables +.env + +# Pytest cache files +.pytest_cache/ + +# Node.js/Frontend (Vite + React + Tailwind CSS) + +# Node modules +node_modules/ + +# Build output +dist/ +build/ + +# Local environment variables +.env.local +.env.development.local +.env.test.local +.env.production.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +.vscode/ +.idea/ + +# General + +# System files +.DS_Store +Thumbs.db + +# Backup files +*.bak +*.swp +*.swo + +# Git specific +.git/ + +# MacOS specific +**/.DS_Store +