Skip to content

Commit c1c5a34

Browse files
committed
Chore: Allow supplying a Context to GithubController
1 parent 87f5335 commit c1c5a34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sqlmesh/integrations/github/cicd/controller.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ def __init__(
290290
config: t.Optional[t.Union[Config, str]] = None,
291291
event: t.Optional[GithubEvent] = None,
292292
client: t.Optional[Github] = None,
293+
context: t.Optional[Context] = None,
293294
) -> None:
294295
from github import Github
295296

@@ -331,7 +332,7 @@ def __init__(
331332
if review.state.lower() == "approved"
332333
}
333334
logger.debug(f"Approvers: {', '.join(self._approvers)}")
334-
self._context: Context = Context(paths=self._paths, config=self.config)
335+
self._context: Context = context or Context(paths=self._paths, config=self.config)
335336

336337
# Bot config needs the context to be initialized
337338
logger.debug(f"Bot config: {self.bot_config.json(indent=2)}")

0 commit comments

Comments
 (0)