You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 12:49:53