Skip to content

Commit

Permalink
add: nicer error message for unknown block reason (#139)
Browse files Browse the repository at this point in the history
Kodiak will merge PRs even if it doesn't know why it's blocked. This should cover the case of CODEOWNERS while a fix is built.
  • Loading branch information
chdsbd authored and kodiakhq[bot] committed Jul 28, 2019
1 parent 9988314 commit 42194b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kodiak/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def mergeable(
if need_branch_update:
raise NeedsBranchUpdate("behind branch. need update")

raise NotQueueable("Could not determine why PR is blocked")
raise NotQueueable("Merging blocked by branch protection settings")

# okay to merge
return None
2 changes: 1 addition & 1 deletion kodiak/test_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def test_unknown_blockage(
branch_protection.requiredApprovingReviewCount = 0
branch_protection.requiresStatusChecks = False
pull_request.mergeStateStatus = MergeStateStatus.BLOCKED
with pytest.raises(NotQueueable, match="determine why PR is blocked"):
with pytest.raises(NotQueueable, match="blocked by branch protection settings"):
mergeable(
config=config,
pull_request=pull_request,
Expand Down

0 comments on commit 42194b6

Please sign in to comment.