Skip to content

参考数据:GitHub App 安装 PR 描述

Data: GitHub App installation PR description

v2.0.14

Template for PR description when installing Claude Code GitHub App integration

🤖 安装 Claude Code GitHub 应用

此 PR 添加了一个 GitHub Actions 工作流,以便在我们的代码仓库中启用 Claude Code 集成。

什么是 Claude Code?

Claude Code 是一个 AI 编码 agent,可以帮助处理:

  • 错误修复和改进
  • 文档更新
  • 实现新功能
  • 代码审查和建议
  • 编写测试
  • 以及更多!

工作原理

一旦此 PR 被合并,我们将能够通过在 pull request 或 issue 评论中提及 @claude 来与 Claude 交互。 工作流被触发后,Claude 将分析评论及周边上下文,并在 GitHub action 中执行请求。

重要说明

  • 此工作流在此 PR 合并前不会生效
  • @claude 提及在合并完成前不会起作用
  • 每当在 PR 或 issue 评论中提及 Claude 时,工作流会自动运行
  • Claude 可以访问整个 PR 或 issue 上下文,包括文件、差异和之前的评论

安全性

  • 我们的 Anthropic API 密钥安全地存储为 GitHub Actions secret
  • 只有对仓库具有写入权限的用户才能触发工作流
  • 所有 Claude 运行记录都存储在 GitHub Actions 运行历史中
  • Claude 的默认工具仅限于读取/写入文件以及通过创建评论、分支和提交与我们的仓库交互。
  • 我们可以通过将它们添加到工作流文件来添加更多允许的工具,例如:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

更多信息请参阅 Claude Code action 仓库

合并此 PR 后,让我们尝试在任何 PR 的评论中提及 @claude 来开始使用吧!


英文原文 / English Original

\uD83E\uDD16 Installing Claude Code GitHub App

This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.

What is Claude Code?

Claude Code is an AI coding agent that can help with:

  • Bug fixes and improvements
  • Documentation updates
  • Implementing new features
  • Code reviews and suggestions
  • Writing tests
  • And more!

How it works

Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment. Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.

Important Notes

  • This workflow won't take effect until this PR is merged
  • @claude mentions won't work until after the merge is complete
  • The workflow runs automatically whenever Claude is mentioned in PR or issue comments
  • Claude gets access to the entire PR or issue context including files, diffs, and previous comments

Security

  • Our Anthropic API key is securely stored as a GitHub Actions secret
  • Only users with write access to the repository can trigger the workflow
  • All Claude runs are stored in the GitHub Actions run history
  • Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
  • We can add more allowed tools by adding them to the workflow file like:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

There's more information in the Claude Code action repo.

After merging this PR, let's try mentioning @claude in a comment on any PR to get started!