chore(cla): 改进 bot 识别与勾选匹配逻辑#8
Merged
Merged
Conversation
- bot 跳过改用 pr.user.type === 'Bot',allowlist 保留作兜底;
此前只有 3 个特定 bot 在 allowlist,其他 bot(如 imgbot/pre-commit-ci)会被误判为 fail
- CLA 勾选匹配兼容 [x] / [X];GitHub 二者都视为已勾选,原实现仅 includes('[x]') 会漏判
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明 / Description
回应 #7 的 Copilot review,改进 cla.yml:
pr.user.type === 'Bot'(保留 allowlist 作兜底)原实现只放行 3 个特定 bot 登录名,其他 bot(imgbot / pre-commit-ci 等)会被误判为 fail。
[x]与[X]GitHub 二者都视为已勾选,原
body.includes('[x] ...')会漏判[X]。测试方式 / Test Plan
pull_request_target触发器(防止 PR 通过修改 cla.yml 旁路 CLA 检查)检查清单 / Checklist