feat: add tag mode workflow for Forgejo

Enables @claude mentions on issues, PR review comments,
issue assignment, and label triggers on Forgejo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad MocanuandClaude Opus 4.6 committed 2026-02-25 20:00:26 +02:00
1 parent ef8657f2de
commit c2ea0a6dba
1 file changed
+61
+61
View File
@@ -0,0 +1,61 @@
name: Claude Code (Forgejo)
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned, labeled]
pull_request_review:
types: [submitted]
concurrency:
group: claude-${{ github.event.issue.number || github.event.pull_request.number }}-${{ github.run_id }}
jobs:
claude:
if: |
(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' && (
github.event.action == 'labeled' ||
github.event.action == 'assigned' ||
contains(github.event.issue.body, '@claude') ||
contains(github.event.issue.title, '@claude')
))
runs-on: grunt
steps:
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: ./
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.FORGEJO_CLAUDE_TOKEN }}
platform: "forgejo"
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: Debug on failure
if: failure()
run: |
echo "=== Debug Info ==="
echo "Platform: PLATFORM=$PLATFORM FORGEJO=$FORGEJO"
echo "Server URL: $GITHUB_SERVER_URL"
echo "API URL: $GITHUB_API_URL"
echo "Event: ${{ github.event_name }} / ${{ github.event.action }}"
echo "Actor: ${{ github.actor }}"
echo ""
EXEC_FILE="${{ steps.claude.outputs.execution_file }}"
if [ -f "$EXEC_FILE" ]; then
echo "--- Execution file contents ---"
cat "$EXEC_FILE"
else
echo "No execution file found"
fi