From c1c5a341c3bd4539b0fa9ee3be819568940971ac Mon Sep 17 00:00:00 2001 From: Erin Drummond Date: Mon, 21 Jul 2025 16:37:25 +1200 Subject: [PATCH] Chore: Allow supplying a Context to GithubController --- sqlmesh/integrations/github/cicd/controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sqlmesh/integrations/github/cicd/controller.py b/sqlmesh/integrations/github/cicd/controller.py index 29de4658d3..48ec7ee32e 100644 --- a/sqlmesh/integrations/github/cicd/controller.py +++ b/sqlmesh/integrations/github/cicd/controller.py @@ -290,6 +290,7 @@ def __init__( config: t.Optional[t.Union[Config, str]] = None, event: t.Optional[GithubEvent] = None, client: t.Optional[Github] = None, + context: t.Optional[Context] = None, ) -> None: from github import Github @@ -331,7 +332,7 @@ def __init__( if review.state.lower() == "approved" } logger.debug(f"Approvers: {', '.join(self._approvers)}") - self._context: Context = Context(paths=self._paths, config=self.config) + self._context: Context = context or Context(paths=self._paths, config=self.config) # Bot config needs the context to be initialized logger.debug(f"Bot config: {self.bot_config.json(indent=2)}")