build: separate Qt5 and Qt6 build configurations by split debian/control #16
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
| name: opencode-review | |
| on: | |
| # issue_comment covers both issues and PR comments | |
| issue_comment: | |
| types: [created] | |
| pull_request_review_comment: | |
| types: [created] | |
| jobs: | |
| review: | |
| # Only trigger in PRs (not issues), and require @opencode or /opencode trigger | |
| if: | | |
| ( | |
| github.event_name == 'issue_comment' && | |
| github.event.issue.pull_request && | |
| ( | |
| contains(github.event.comment.body, '@opencode') || | |
| contains(github.event.comment.body, '/opencode') | |
| ) | |
| ) || | |
| ( | |
| github.event_name == 'pull_request_review_comment' && | |
| ( | |
| contains(github.event.comment.body, '@opencode') || | |
| contains(github.event.comment.body, '/opencode') | |
| ) | |
| ) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # Change to 'write' to allow OpenCode to push commits | |
| pull-requests: write # Required to post comments (kept as write for responses) | |
| issues: read # Change to 'write' if you enable issue workflows later | |
| actions: read # Required to read CI results on PRs | |
| id-token: write # Required for OIDC token generation (OpenCode GitHub App) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: anomalyco/opencode/github@latest | |
| env: | |
| # ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| ZHIPU_API_KEY: ${{ secrets.ZHIPU_API_KEY }} | |
| ZHIPU_BASE_URL: ${{ secrets.ZHIPU_BASE_URL }} | |
| # with: | |
| # # model: anthropic/claude-sonnet-4-20250514 | |
| # model: zai-coding-plan/glm-4.7 | |
| # use_github_token: true | |
| # prompt: | | |
| # Review this pull request: | |
| # - Check for code quality issues | |
| # - Look for potential bugs | |
| # - Suggest improvements | |
| with: | |
| model: ${{ secrets.OPENCODE_PR_REVIEW_MODEL }} | |
| share: false | |
| agent: plan | |
| prompt: | | |
| 你是一位严格的代码安全审计员。请对代码变更进行审查。 | |
| 【审查原则 - 去噪模式】: | |
| - **只报告高风险问题**:例如导致崩溃、安全漏洞、数据丢失、构建失败、严重的逻辑错误。 | |
| - **忽略以下问题**:代码风格、变量命名、微小的性能优化、非确定性的潜在问题。 | |
| - 如果不确定,不要报告。 | |
| - 如果没有高风险问题,请回复:"No critical risks found." | |
| 【输出格式要求】: | |
| 第一部分:具体风险建议(每个问题一段,紧凑排列) | |
| 针对每一个高风险问题,严格按照以下格式输出: | |
| suggestion (bug_risk): [一句话概括核心问题] | |
| [简短解释为什么这是风险] | |
| Suggested implementation: | |
| ```[语言] | |
| [直接给出修复后的代码片段,或者是 diff 格式] | |
| ``` | |
| 第二部分:AI 修复指令汇总 | |
| 在列出所有具体建议后,请单独生成以下标题和代码块: | |
| Prompt for AI Agents: | |
| ```markdown | |
| [请在此处生成一段总结性的指令。这段指令是给另一个 AI Agent (如 Cursor, Copilot) 用的,目的是让它基于上述发现的问题,直接执行代码修改。] | |
| [指令要求:请将上述所有发现的风险问题进行精炼总结,明确指出需要修改的文件路径和核心修改逻辑(例如:修复 debian/control 中的依赖冲突,添加 Breaks 字段;修复 src/main.js 中的空指针风险等),不需要再粘贴具体代码,只需描述任务。] | |
| ``` | |
| 开始审查: |