You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AlexStocks (via GitHub)" <gi...@apache.org> on 2025/09/06 05:15:46 UTC
[I] [FEATURE] build a PR review workflow in github action [dubbo-go]
AlexStocks opened a new issue, #3005:
URL: https://github.com/apache/dubbo-go/issues/3005
### ✅ 验证清单
- [x] 🔍 我已经搜索过 [现有 Issues](https://github.com/apache/dubbo-go/issues),确信这不是重复请求
- [x] 📋 我已经查看了 [发布说明](https://github.com/apache/dubbo-go/releases),确信此功能尚未实现
### 🎯 功能描述
build a PR review workflow in github action
### 📋 使用场景
PR Review
### ⚖️ 复杂性与风险评估
_No response_
### 🔗 外部依赖
_No response_
### 📚 附加信息
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [FEATURE] build a PR review workflow in github action [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on issue #3005:
URL: https://github.com/apache/dubbo-go/issues/3005#issuecomment-3260938920
GPT 回复:
```markdown
可以的 👍 群里如果只想用 **免费的**,又能在 **GitHub Action 里配置自动触发 code review**,其实已经有不少开源项目。整理几个常见的:
---
## 🚀 免费 + GitHub Action 可用的 AI Code Review 工具
### 1. **PR-Agent (CodiumAI 出品的开源版)**
* **地址**: [[CodiumAI/pr-agent](https://github.com/CodiumAI/pr-agent)](https://github.com/CodiumAI/pr-agent)
* **特点**:
* 完全开源,支持 GitHub Action 直接配置
* 在 PR 评论里输入 `/review`、`/improve` 就能触发 GPT 生成评审意见
* 也支持自动触发模式
* **成本**: 免费(需要自己提供 OpenAI API Key)
---
### 2. **[microsoft/gpt-review](https://github.com/microsoft/gpt-review)**
* **地址**: [microsoft/gpt-review](https://github.com/microsoft/gpt-review)
* **特点**:
* 微软官方项目,支持 GitHub Action 或 CLI
* 能分析 PR diff,并输出建议评论
* 支持 OpenAI / Azure OpenAI
* **成本**: 免费(同样需要 API Key)
---
### 3. **[agogear/chatgpt-pr-review](https://github.com/agogear/chatgpt-pr-review)**
* **地址**: [agogear/chatgpt-pr-review](https://github.com/agogear/chatgpt-pr-review)
* **特点**:
* 专门做成 GitHub Action 的 AI PR Review 工具
* 每次有人提 PR,Action 会跑一遍,把结果直接写成 PR 评论
* **成本**: 免费(依赖 OpenAI API Key)
---
### 4. **[cirolini/genai-code-review](https://github.com/cirolini/genai-code-review)**
* **地址**: [cirolini/genai-code-review](https://github.com/cirolini/genai-code-review)
* **特点**:
* 也是 GitHub Action 插件
* 支持配置模型(如 GPT-3.5、GPT-4)
* 会自动生成 review 评论,贴在 PR 下面
* **成本**: 免费(需要 API Key)
---
## ⚡ 总结
如果你要在群里推荐:
* **最活跃/成熟的**:`PR-Agent`
* **官方背景的**:`microsoft/gpt-review`
* **上手最简单的**:`agogear/chatgpt-pr-review` 或 `genai-code-review`
它们都是开源免费的,只是 **调用 GPT 时要自己出 API Key 的费用**。
---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [FEATURE] build a PR review workflow in github action [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on issue #3005:
URL: https://github.com/apache/dubbo-go/issues/3005#issuecomment-3356771341
> [@AlexStocks](https://github.com/AlexStocks) please give it to me
any progress? my dear friend
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [FEATURE] build a PR review workflow in github action [dubbo-go]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl closed issue #3005: [FEATURE] build a PR review workflow in github action
URL: https://github.com/apache/dubbo-go/issues/3005
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [FEATURE] build a PR review workflow in github action [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on issue #3005:
URL: https://github.com/apache/dubbo-go/issues/3005#issuecomment-3260890181
Grok suggestion:
```markdown
以下是一些**免费的**、可以在 GitHub Actions 中配置并自动触发的代码审查工具,特别适合在 GitHub Pull Request (PR) 流程中使用的工具。这些工具要么完全免费,要么提供开源项目的免费使用选项,并且可以轻松集成到 GitHub Actions 工作流中。以下是详细总结,基于当前可用的信息:
---
### 1. CodiumAI PR-Agent
- **描述**: 一个开源的 AI 驱动工具,专注于自动化 PR 审查,提供代码建议、PR 描述生成和合规性检查。它使用大语言模型(如 GPT-4 或兼容模型),但对开源仓库提供免费使用。
- **特点**:
- 自动分析 PR 变更,生成代码改进建议。
- 支持检查代码是否符合仓库指南。
- 可生成 PR 摘要或改进描述。
- 对开源项目完全免费,私人仓库可能需要付费计划。
- **GitHub Actions 配置**:
- 通过 GitHub Marketplace 安装或手动添加 Actions YAML 文件。
- 配置简单的触发事件(如 `pull_request`)。
- 如果使用自托管模型,可能需要 API 密钥(但开源仓库通常免配置)。
- **触发方式**:
```yaml
name: PR Agent
on:
pull_request:
types: [opened, synchronize]
jobs:
pr-agent:
runs-on: ubuntu-latest
steps:
- uses: Codium-ai/pr-agent@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
```
- **链接**: [CodiumAI PR-Agent](https://github.com/Codium-ai/pr-agent)
- **免费说明**: 开源仓库免费,易于设置,社区支持活跃。
---
### 2. LlamaPReview
- **描述**: 一个新兴的免费工具,利用链式推理(Chain-of-Thought)LLM 进行 PR 审查,专注于发现潜在 bug 和代码问题。特别适合希望一键安装的团队。
- **特点**:
- 完全免费,无需额外 API 密钥。
- 提供详细的 PR 评论,突出潜在 bug。
- 支持自动化触发,安装简单。
- **GitHub Actions 配置**:
- 通过 GitHub Marketplace 一键安装。
- 配置触发事件(如 PR 创建或更新)。
- 示例 YAML:
```yaml
name: LlamaPReview
on:
pull_request:
types: [opened, edited, synchronize]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: QuasarByte/llama-preview@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
```
- **链接**: [LlamaPReview](https://github.com/QuasarByte/llm-code-review-maven-plugin)
- **免费说明**: 完全免费,专为开源项目设计,适合快速上手。
---
### 3. CodeQL (GitHub 官方)
- **描述**: GitHub 提供的静态代码分析工具,内置于 GitHub Actions,特别适合检测安全漏洞和代码质量问题。虽然不是基于 GPT,但功能强大且免费。
- **特点**:
- 检测常见的安全问题(如 SQL 注入、XSS)。
- 支持多种语言(C/C++、Java、Python、JavaScript 等)。
- 自动在 PR 上生成评论或问题。
- 对开源仓库完全免费,私人仓库在 GitHub Advanced Security 下可能需要付费。
- **GitHub Actions 配置**:
- 使用 GitHub 提供的 CodeQL Action。
- 示例 YAML:
```yaml
name: CodeQL Analysis
on:
pull_request:
branches: [main]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: javascript,python
- uses: github/codeql-action/analyze@v3
```
- **链接**: [CodeQL](https://docs.github.com/en/code-security/code-scanning/using-codeql-code-scanning-with-github-actions)
- **免费说明**: 开源仓库免费,GitHub 官方支持,适合安全和质量审查。
---
### 4. Reviewdog
- **描述**: 一个轻量级的代码审查工具,支持集成多种静态分析工具(如 ESLint、Pylint)并在 PR 上添加评论。它不是 AI 驱动,但结合静态分析器可实现类似审查效果,且完全免费。
- **特点**:
- 支持多种 linter 工具,生成 PR 注释。
- 轻量且高度可定制。
- 与 GitHub Actions 无缝集成。
- **GitHub Actions 配置**:
- 配置 linter 和 Reviewdog Action。
- 示例 YAML(以 ESLint 为例):
```yaml
name: Reviewdog
on:
pull_request:
branches: [main]
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
```
- **链接**: [Reviewdog](https://github.com/reviewdog/reviewdog)
- **免费说明**: 完全免费,支持多种语言和 linter,适合轻量级审查。
---
### 5. Danger
- **描述**: 一个自动化代码审查工具,支持自定义规则和脚本,允许在 PR 上添加评论。它不基于 GPT,但可以通过插件集成 AI 模型,且核心功能免费。
- **特点**:
- 高度可定制,支持 Ruby、JavaScript 或 Python 脚本。
- 可检查代码规范、提交消息格式等。
- 直接在 PR 上添加评论。
- **GitHub Actions 配置**:
- 配置 Danger Action,运行自定义规则。
- 示例 YAML:
```yaml
name: Danger
on:
pull_request:
types: [opened, synchronize]
jobs:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: danger/danger-js@11
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
- **链接**: [Danger](https://danger.systems)
- **免费说明**: 核心功能免费,适合需要自定义审查规则的团队。
---
### 注意事项
- **AI 工具限制**: 像 CodiumAI PR-Agent 和 LlamaPReview 这样的 AI 工具可能依赖外部模型,免费版本可能有使用限制(如 API 调用次数)。但对开源项目通常足够。
- **静态分析 vs AI**: CodeQL 和 Reviewdog 更适合检测明确的代码问题(如安全漏洞或风格问题),而 CodiumAI 和 LlamaPReview 提供更智能的语义审查。
- **触发配置**: 所有工具都支持 `on: pull_request` 事件,确保 PR 创建或更新时自动运行。
- **隐私**: 使用 GitHub Secrets 存储任何 API 密钥(如 GITHUB_TOKEN),避免泄露。
- **扩展性**: 如果需要更智能的审查,可以考虑结合免费工具和自托管 LLM(如 LLaMA),但需要更多配置。
### 推荐
- **简单上手**: LlamaPReview(一键安装,完全免费)。
- **安全审查**: CodeQL(GitHub 官方,适合安全检测)。
- **灵活性**: Reviewdog 或 Danger(支持多种 linter 或自定义规则)。
- **AI 驱动**: CodiumAI PR-Agent(开源项目免费,智能建议)。
如果需要帮助配置某个工具的 YAML 文件或想深入探讨某个工具的优缺点,请告诉我!
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [FEATURE] build a PR review workflow in github action [dubbo-go]
Posted by "zhuyanhuazhuyanhua (via GitHub)" <gi...@apache.org>.
zhuyanhuazhuyanhua commented on issue #3005:
URL: https://github.com/apache/dubbo-go/issues/3005#issuecomment-3263301366
@AlexStocks please give it to me
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org