Nox-Lumen AutoNox-Lumen Auto

github-integration

能力

面向 GitHub / GitHub Enterprise 的 PR 审核闭环。

Tool用途
github_get_pr拉取 PR 元数据(标题、描述、状态、评审人、CI 状态)
github_get_pr_diff拉取 PR diff
github_post_pr_review提交 Review(APPROVE / REQUEST_CHANGES / COMMENT
ask_user模糊场景确认

Review 状态

状态含义
APPROVE批准合并
REQUEST_CHANGES要求修改才能合并
COMMENT只评论不表态

典型流程

Webhook: pull_request opened/synchronize

github_get_pr(pr_number=123)
github_get_pr_diff(pr_number=123)

L1 静态分析 + L2 code-review

github_post_pr_review(
    event="REQUEST_CHANGES" | "APPROVE" | "COMMENT",
    body="审核结果摘要",
    comments=[{path, line, body}, ...]  # 行级内联评论
)

安全 / 合规

  • 凭据:PAT (Personal Access Token) 或 GitHub App(推荐)
  • 范围:最小权限原则,只授权 repo:pull_request 必要 scope
  • 审计:所有 review 操作上 ledger

触发方式

/github-integration 审核 octocat/hello-world PR #42

自然语言示例:

  • "看看这个 PR 有没有问题"
  • "对该 PR 做代码审核,如果 OK 就 approve"
  • "把所有的问题写成行级评论"

相关技能

On this page