File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed
sqlmesh/integrations/github/cicd Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,7 @@ class GithubCICDBotConfig(BaseConfig):
3333 pr_environment_name : t .Optional [str ] = None
3434 pr_min_intervals : t .Optional [int ] = None
3535 prod_branch_names_ : t .Optional [str ] = Field (default = None , alias = "prod_branch_name" )
36- forward_only_branch_suffix_ : t .Optional [str ] = Field (
37- default = None , alias = "forward_only_branch_suffix"
38- )
36+ forward_only_branch_suffix : t .Optional [str ] = None
3937
4038 @model_validator (mode = "before" )
4139 @classmethod
@@ -76,10 +74,6 @@ def skip_pr_backfill(self) -> bool:
7674 return True
7775 return self .skip_pr_backfill_
7876
79- @property
80- def forward_only_branch_suffix (self ) -> str :
81- return self .forward_only_branch_suffix_ or "-forward-only"
82-
8377 FIELDS_FOR_ANALYTICS : t .ClassVar [t .Set [str ]] = {
8478 "invalidate_environment_after_deploy" ,
8579 "enable_deploy_command" ,
Original file line number Diff line number Diff line change @@ -478,11 +478,13 @@ def pr_targets_prod_branch(self) -> bool:
478478 return self ._pull_request .base .ref in self .bot_config .prod_branch_names
479479
480480 @property
481- def forward_only_plan (self ) -> bool :
482- head_ref = self ._pull_request .head .ref
483- if isinstance (head_ref , str ):
484- return head_ref .endswith (self .bot_config .forward_only_branch_suffix )
485- return False
481+ def forward_only_plan (self ) -> t .Optional [bool ]:
482+ if self .bot_config .forward_only_branch_suffix is not None :
483+ head_ref = self ._pull_request .head .ref
484+ if isinstance (head_ref , str ):
485+ return head_ref .endswith (self .bot_config .forward_only_branch_suffix )
486+ return False
487+ return None
486488
487489 @classmethod
488490 def _append_output (cls , key : str , value : str ) -> None :
You can’t perform that action at this time.
0 commit comments