Skip to content

Qoder setup 1771143029#2

Merged
ShihaoShenDev merged 2 commits intoavaloniafrom
qoder-setup-1771143029
Feb 15, 2026
Merged

Qoder setup 1771143029#2
ShihaoShenDev merged 2 commits intoavaloniafrom
qoder-setup-1771143029

Conversation

@ShihaoShenDev
Copy link
Copy Markdown
Collaborator

Setup Qoder AI workflow

This PR adds GitHub Actions workflows to integrate Qoder.

Included files:

  • .github/workflows/qoder-auto-review.yml
  • .github/workflows/qoder-assistant.yml

Usage:

  • Open or update a Pull Request to trigger automated review
  • Mention @qoder in issues or PR comments to get assistance

香!(来自开发者)


吓死我力,还以为开小号被发现了
image

Copy link
Copy Markdown
Contributor

@qoderai qoderai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR cleanly wires Qoder into your repo via assistant and auto-review workflows, with sensible permissions and clear prompts, and the overall YAML structure looks solid.

Key Risks & Issues

  • Auto review currently runs on the pull_request event while depending on secrets.QODER_PERSONAL_ACCESS_TOKEN, which will not be available for forked PRs; external contributors may see failing or non-functional review checks. Consider guarding the job when the secret is unavailable (e.g., checking github.event.pull_request.head.repo.fork or the secret’s presence) or adjusting the workflow pattern (such as pull_request_target with appropriate hardening) if you want reviews on forks.
  • Qoder behavior (language, action version, and prompt shape) is duplicated between the assistant and auto-review workflows; over time this can drift, making it harder to reason about and maintain the integration.

Verification Advice

  • Open test PRs from both the same repository and a fork to confirm how qoder-auto-review behaves when the secret is present vs. unavailable, and ensure the resulting check status and logs are clear to contributors.
  • Trigger qoder-assistant via comments on issues, PRs, and review threads (including comments with Chinese text and markdown) to verify that the ARGS payload is built as expected and that OUTPUT_LANGUAGE:Chinese is consistently applied.
  • Decide whether Qoder failures (network issues, invalid token, rate limits) should block merges; if not, consider adding explicit handling (such as continue-on-error) and validate the behavior in those failure modes.

Thoughts & Suggestions

  • Consider extracting shared Qoder configuration (action version, OUTPUT_LANGUAGE, and common permissions) into a reusable workflow or composite action so that assistant and auto-review stay in sync and are easier to evolve.
  • If you plan to support external contributors, clarifying (in docs or PR templates) when auto-review is expected to run versus being skipped for forks will reduce confusion when checks do not behave the same across PR types.

🤖 Generated by QoderView workflow run

Comment on lines +21 to +24
- name: Run Qoder Code Review
uses: QoderAI/qoder-action@v0
with:
qoder_personal_access_token: ${{ secrets.QODER_PERSONAL_ACCESS_TOKEN }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The auto review workflow is triggered by the pull_request event while also depending on qoder_personal_access_token from secrets.QODER_PERSONAL_ACCESS_TOKEN. For pull requests opened from forks, GitHub does not expose repository secrets to pull_request workflows, so this step is likely to fail or behave unexpectedly for external contributors. If you want Qoder reviews to be reliable for forked PRs, consider either skipping this job when secrets are unavailable (for example by checking github.event.pull_request.head.repo.fork or the presence of the secret) or moving the secret-dependent logic to a workflow pattern that supports secrets for forks (such as pull_request_target with appropriate hardening).


🤖 Generated by QoderFix in Qoder

Copy link
Copy Markdown
Contributor

@qoderai qoderai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Review Summary

这次 PR 主要是为仓库接入 Qoder 的自动 Review 和助手工作流,并统一输出语言为中文,整体方向很赞,有利于后续代码质量和协作效率。改动集中在 GitHub Actions 工作流层面,对业务代码没有直接影响。

🛡️ Key Risks & Issues

  • .github/workflows/qoder-assistant.yml 中,Build Arguments 步骤将 github.event.comment.body 等字段直接内联到 shell 脚本的多行字符串中,这些字段完全由用户评论内容控制,展开后会成为 shell 源码的一部分。只要评论里包含合适的双引号、分号、换行等字符,就有机会打破 ARGS="..." 的字符串边界,继续拼接出额外的命令,属于高风险的命令注入入口;即使不被恶意利用,也很容易因为复杂 Markdown/多行文本导致脚本语法错误,让工作流偶发失败。虽然这段逻辑并非本 PR 新增,但随着 OUTPUT_LANGUAGE:Chinese 的加入,这个工作流会被更多依赖,建议在本次集成阶段一并修掉,改为更安全的参数传递方式(例如借助 toJson 转义、使用 env/with 传递字段,在 Action 内部解析等)。

🧪 Verification Advice

  • 在测试 PR/Issue 中用多种场景手动验证 qoder-assistant:
    • 分别在 PR 评论、PR Review 评论、Issue 评论中 @qoder,确认在符合条件时工作流会触发,且 Qoder 能正常回复;不包含 @qoder 时不触发。
    • 构造包含多行文本、代码块、双引号/分号/反引号等特殊字符的评论,并 @qoder,观察工作流是否仍然稳定执行,是否出现 shell 语法错误或异常中断。
    • 检查当 secrets.QODER_PERSONAL_ACCESS_TOKEN 缺失或权限不足时的失败信息是否足够清晰,不会影响其他 CI 任务。
  • 对 qoder-auto-review 工作流,在一个测试 PR 上验证 opened/synchronize/reopened 三个事件都能正确触发 Review,观察是否存在重复刷评论或长时间排队、超时等问题,评估在高频提交情况下的可用性。

💡 Thoughts & Suggestions

  • 将用户输入直接拼接到 shell 中在安全上比较敏感,推荐尽量把 GitHub 上下文字段当作“数据”而不是“源码”来处理,通过 JSON 或 env 的方式传下去,让 Qoder Action 或后续逻辑去解析,这样既安全也更易于维护。
  • 两个工作流的触发条件和权限配置整体合理,后续如果仓库活跃度提高,可以考虑增加一些节流或幂等策略,避免在高频推送 PR 时过度触发自动 Review。
  • 当前改动不影响应用本身的构建和测试,但未来可以考虑在 README 或贡献文档中简单说明“如何触发 Qoder 助手/自动 Review”,方便团队成员正确使用。

🤖 Generated by QoderView workflow run

@ShihaoShenDev ShihaoShenDev merged commit 003d353 into avalonia Feb 15, 2026
4 checks passed
@ShihaoShenDev ShihaoShenDev deleted the qoder-setup-1771143029 branch February 15, 2026 08:18
@ShihaoShenDev
Copy link
Copy Markdown
Collaborator Author

@qoder 用free账号使用qoder action可行吗

@ShihaoShenDev
Copy link
Copy Markdown
Collaborator Author

@ShihaoShen-Bot(“AAA 专业开小号被抓包 电教沈同学的Bot”)
image

@ShihaoShenDev
Copy link
Copy Markdown
Collaborator Author

/oc 帮我禁用qoder相关workflow(将文件名改为xxx.yml.disabled)

@opencode-agent
Copy link
Copy Markdown
Contributor

fatal: couldn't find remote ref qoder-setup-1771143029

opencode session  |  github run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant