feature/FA-11_CICD #33
@@ -1,43 +1,49 @@
|
|||||||
name: Claude Assistant for Gitea
|
name: Claude PR Assistant
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger on issue comments (works on both issues and pull requests in Gitea)
|
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
# Trigger on issues being opened or assigned
|
pull_request_review_comment:
|
||||||
|
types: [created]
|
||||||
issues:
|
issues:
|
||||||
types: [opened, assigned]
|
types: [opened, assigned]
|
||||||
# Note: pull_request_review_comment has limited support in Gitea
|
pull_request_review:
|
||||||
# Use issue_comment instead which covers PR comments
|
types: [submitted]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
claude-assistant:
|
claude-code-action:
|
||||||
# Basic trigger detection - check for @claude in comments or issue body
|
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
(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
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
issues: write
|
issues: write
|
||||||
# Note: Gitea Actions may not require id-token: write for basic functionality
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Run Claude Assistant
|
- name: Run Claude PR Action
|
||||||
uses: markwylde/claude-code-gitea-action
|
uses: anthropics/claude-code-action@beta
|
||||||
with:
|
with:
|
||||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
gitea_token: ${{ secrets.CLAUDE_GITEA_TOKEN }}
|
gitea_token: ${{ secrets.CLAUDE_GITEA_TOKEN }}
|
||||||
|
# Or use OAuth token instead:
|
||||||
|
# claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
timeout_minutes: "60"
|
timeout_minutes: "60"
|
||||||
trigger_phrase: "@claude"
|
# mode: tag # Default: responds to @claude mentions
|
||||||
# Optional: Customize for Gitea environment
|
# Optional: Restrict network access to specific domains only
|
||||||
custom_instructions: |
|
# experimental_allowed_domains: |
|
||||||
You are working in a Gitea environment. Be aware that:
|
# .anthropic.com
|
||||||
- Some GitHub Actions features may behave differently
|
# .github.com
|
||||||
- Focus on core functionality and avoid advanced GitHub-specific features
|
# api.github.com
|
||||||
- Use standard git operations when possible
|
# .githubusercontent.com
|
||||||
|
# bun.sh
|
||||||
|
# registry.npmjs.org
|
||||||
|
# .blob.core.windows.net
|
||||||
Reference in New Issue
Block a user