Required status check added via ruleset gets permanently stuck as "Expected" on pre-existing open PRs, with no in-UI way to resolve it #209881
Replies: 2 comments 1 reply
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
A required check only counts when it is reported against the pull request's latest head commit, and in your repro nothing can ever report it: the workflow file is not part of the head commit, so the run that would produce the The way out is to give the head commit a chance to run the workflow:
Two related points from the docs: required checks must pass on the latest commit SHA, results from older commits do not carry over; and checks only satisfy a ruleset when the run is triggered by an eligible event such as An admin can bypass the ruleset once to unblock a specific PR, but update-and-push is what fixes it permanently for that PR. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
Summary
When an organization adds a new required status check to a branch ruleset (or classic branch protection), the requirement applies retroactively to all open PRs already targeting that branch. Any open PR whose head branch predates the producing workflow (or whose workflow emits a different check context name) can never satisfy the new requirement, because a required check is only marked satisfied when a workflow runs on that PR's head commit and reports that exact context. If the head branch does not contain the workflow file, nothing ever reports the context. The PR then shows the check as Required with the status "Expected, Waiting for status to be reported" indefinitely, with no button to run or re-run it (there is no run to re-run) and no guidance on how to clear it.
Environment
Plan: GitHub Team. Feature: branch rulesets (and classic branch protection) with required status checks. Repo settings at defaults: allow_update_branch = false and strict required status checks = false.
Steps to reproduce
Observed behavior
Expected / kinder behavior
When a required check has never been reported on a PR AND the branch is behind base (and/or lacks the producing workflow), detect this and surface, in the merge box, an "Update branch to run required checks" action plus a one-line reason, even when allow_update_branch is off and checks are non-strict. At minimum, explain why the check is "Expected" and how to resolve it, instead of an indefinite silent wait.
Impact
This happens every time an org introduces a new required check on an active repo with open PRs, which is a common hardening step. Each affected PR becomes unmergeable with no self-service remedy; the workaround (rebase/update each branch from the CLI, or toggle repo settings) is non-obvious and invisible to the PR author.
Suggested improvement
Detect the "required check never reported + branch behind base and/or missing producing workflow" state and surface a clear "Update branch to run required checks" affordance with a one-line reason, independent of the allow_update_branch and strict-checks settings; or at least show the reason and resolution steps.
All reactions