[BUG] 我发现了一个bug #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024-2026 the original author or authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Claude Assistant | |
on: | |
issue_comment: | |
types: [created] | |
pull_request_review_comment: | |
types: [created] | |
issues: | |
types: [opened, assigned, labeled] | |
pull_request_review: | |
types: [submitted] | |
env: | |
ANTHROPIC_BASE_URL: "https://open.bigmodel.cn/api/anthropic" | |
jobs: | |
claude-response: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: read | |
issues: read | |
id-token: write | |
steps: | |
- uses: anthropics/claude-code-action@v1 | |
with: | |
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
# Or use OAuth token instead: | |
# claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | |
# Optional: provide a prompt for automation workflows | |
# prompt: "Review this PR for security issues" | |
# Optional: pass advanced arguments to Claude CLI | |
# claude_args: | | |
# --max-turns 10 | |
# --model claude-4-0-sonnet-20250805 | |
# Optional: add custom trigger phrase (default: @claude) | |
# trigger_phrase: "/claude" | |
# Optional: add assignee trigger for issues | |
# assignee_trigger: "claude" | |
# Optional: add label trigger for issues | |
# label_trigger: "claude" | |
# Optional: grant additional permissions (requires corresponding GitHub token permissions) | |
# additional_permissions: | | |
# actions: read | |
# Optional: allow bot users to trigger the action | |
# allowed_bots: "dependabot[bot],renovate[bot]" |