GitHub状态检查卡在Expected状态,无需关闭分支保护怎么解决?
问题:PR因未触发的必填状态检查阻塞的解决办法
背景配置
- 主分支已启用分支保护规则,勾选了合并前要求状态检查通过选项,这些状态检查对应Azure DevOps YAML流水线。
- 所有流水线的
trigger与pr配置逻辑一致,示例如下:
item-api-ci 流水线配置
// item-api-ci trigger: batch: true branches: include: - develop - release/* paths: include: - src/API/Item pr: branches: include: - develop - release/* paths: include: - cicd/pipelines/buying/item/item-api-ci.yaml - src/API/Item - src/API/Shared
userprofile-api-ci 流水线配置
// userprofile-api-ci trigger: batch: true branches: include: - develop - release/* paths: include: - src/API/UserProfile pr: branches: include: - develop - release/* paths: include: - cicd/pipelines/buying/userprofile/userprofile-api-ci.yaml - src/API/UserProfile - src/API/Shared
遇到的问题
提交了仅修改src/Deal/目录下文件的PR后,所有CI流水线均被标记为必填状态检查,但并未实际触发运行,仅显示为待完成的状态检查项,导致PR无法合并。
已尝试的操作
- 关闭并重新打开拉取请求
- 推送空提交:
git commit --amend --no-edit git push --force-with-lease - 将其他PR合并到当前分支
- 修改某条流水线的
trigger和pr配置为:trigger: none pr: none
求助
除了禁用「合并前要求状态检查通过」选项,还有什么方法可以解除该PR的阻塞状态?
内容的提问来源于stack exchange,提问作者alexwhitmore
相关产品推荐
相关产品推荐

