yegor256/rultor

Merge fails with a cryptic git push error when GitHub branch protection rules block it

Open

#2,357 opened on Jun 6, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Java (165 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (575 stars)
PR merge metrics
 (PR metrics pending)

Description

Quite often, when I try to merge a pull request using Rultor, I get a confusing error like this:

git push origin master
remote: error: GH013: Repository rule violations found for refs/heads/master.
remote: - A conversation must be resolved before this pull request can be merged.
To github.com:objectionary/lints.git
 ! [remote rejected]   master -> master (push declined due to repository rule violations)
error: failed to push some refs to 'github.com:objectionary/lints.git'

The problem is that the error comes from git push at the very end of the merge process — after Docker is started and the full build is run. At that point, the error message is raw and unhelpful. In this particular case, I had to figure out on my own that the rejection was caused by an outdated (but unresolved) review thread left by a reviewer on an already-superseded commit.

GitHub branch protection rules can block a merge for various reasons: unresolved review conversations, missing required approvals, failing required status checks, and so on. The git push rejection message does not tell me which specific rule was violated or what I need to fix.

You can find a real case here.

Contributor guide