Skip to content

Commit 870fad8

Browse files
committed
Prevent CI/CD bot from deploying then erroring before merging if PR missing CODEOWNERS approval, this is breaking synchronous deployments.
1 parent 922ec89 commit 870fad8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sqlmesh/integrations/github/cicd/controller.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,11 @@ def deploy_to_prod(self) -> None:
773773
"PR is already merged and this event was triggered prior to the merge."
774774
)
775775
merge_status = self._get_merge_state_status()
776+
if merge_status.is_blocked:
777+
raise CICDBotError(
778+
"Merge commit cannot be cleanly created. Likely missing CODEOWNERS approval. "
779+
"Please check PR and resolve any issues."
780+
)
776781
if merge_status.is_dirty:
777782
raise CICDBotError(
778783
"Merge commit cannot be cleanly created. Likely from a merge conflict. "

0 commit comments

Comments
 (0)