Skip to content

chore(cla): 改进 bot 识别与勾选匹配逻辑#8

Merged
yi-ge merged 1 commit into
mainfrom
chore/cla-check-improvements
May 8, 2026
Merged

chore(cla): 改进 bot 识别与勾选匹配逻辑#8
yi-ge merged 1 commit into
mainfrom
chore/cla-check-improvements

Conversation

@yi-ge
Copy link
Copy Markdown
Member

@yi-ge yi-ge commented May 8, 2026

变更说明 / Description

回应 #7 的 Copilot review,改进 cla.yml:

  1. bot 跳过改用 pr.user.type === 'Bot'(保留 allowlist 作兜底)
    原实现只放行 3 个特定 bot 登录名,其他 bot(imgbot / pre-commit-ci 等)会被误判为 fail。
  2. CLA 勾选匹配兼容 [x][X]
    GitHub 二者都视为已勾选,原 body.includes('[x] ...') 会漏判 [X]

测试方式 / Test Plan

  • 本 PR 自身由 OWNER 提交,cla-check 走 OWNER 跳过分支自动通过
  • 不改变 pull_request_target 触发器(防止 PR 通过修改 cla.yml 旁路 CLA 检查)

检查清单 / Checklist

- bot 跳过改用 pr.user.type === 'Bot',allowlist 保留作兜底;
  此前只有 3 个特定 bot 在 allowlist,其他 bot(如 imgbot/pre-commit-ci)会被误判为 fail
- CLA 勾选匹配兼容 [x] / [X];GitHub 二者都视为已勾选,原实现仅 includes('[x]') 会漏判
Copilot AI review requested due to automatic review settings May 8, 2026 10:03
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 8, 2026 10:04am

Request Review

@yi-ge yi-ge merged commit a88ec7b into main May 8, 2026
5 checks passed
@yi-ge yi-ge deleted the chore/cla-check-improvements branch May 8, 2026 10:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CLA-check GitHub Actions workflow to more reliably skip bot-authored PRs and to correctly detect CLA checkbox agreement regardless of [x]/[X] casing in PR descriptions.

Changes:

  • Skip CLA checks when pull_request.user.type === 'Bot', keeping a login allowlist as fallback.
  • Replace exact-string checkbox matching with regex-based matching that accepts both [x] and [X].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants