[release/0.4][Execute Infrastructure] Add bot approval required check gated on risemeup1111 approval#1462
Open
risemeup1111 wants to merge 1 commit into
Conversation
…emeup1111 approval (PaddlePaddle#1460)
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.
PR Category
Execute Infrastructure
PR Types
Devs
Description
新增
.github/workflows/bot-approval-required.yml,在pull_request与pull_request_review事件上作为合入门禁的 required status check。门禁通过条件(满足任一即可,且仅统计当前 head commit 上的评审):
risemeup1111对当前 head commit 提交了APPROVED评审;或sneaxiy或From00任意一个账号对当前 head commit 提交了APPROVED评审。未通过时的中文提醒: 提示 RD 按 AI review 机器人的意见修改代码并提交新 commit,或联系 sneaxiy / From00 approve;并附 P0/P1(必须修复并提交新 commit)、P2/P3(需针对评论回复)处理要求。
可靠性处理:
commit_id过滤到github.event.pull_request.head.sha,避免旧 commit 上的审批在 push 新提交后仍放行未复审的新代码。gh api --paginate ... | jq -s 'add'分页读取全部 reviews,避免超过 100 条时漏判。contents: read与pull-requests: read权限。Cherry-pick of #1460 to
release/0.4.Merged in dev: #1460