Skip to content

Commit d5ceeb2

Browse files
authored
Chore(cicd_bot): Make console printing optional (#5656)
1 parent 529ed00 commit d5ceeb2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

sqlmesh/integrations/github/cicd/command.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,21 @@
2525
envvar="GITHUB_TOKEN",
2626
help="The Github Token to be used. Pass in `${{ secrets.GITHUB_TOKEN }}` if you want to use the one created by Github actions",
2727
)
28+
@click.option(
29+
"--full-logs",
30+
is_flag=True,
31+
help="Whether to print all logs in the Github Actions output or only in their relevant GA check",
32+
)
2833
@click.pass_context
29-
def github(ctx: click.Context, token: str) -> None:
34+
def github(ctx: click.Context, token: str, full_logs: bool = False) -> None:
3035
"""Github Action CI/CD Bot. See https://sqlmesh.readthedocs.io/en/stable/integrations/github/ for details"""
3136
# set a larger width because if none is specified, it auto-detects 80 characters when running in GitHub Actions
3237
# which can result in surprise newlines when outputting dates to backfill
33-
set_console(MarkdownConsole(width=1000, warning_capture_only=True, error_capture_only=True))
38+
set_console(
39+
MarkdownConsole(
40+
width=1000, warning_capture_only=not full_logs, error_capture_only=not full_logs
41+
)
42+
)
3443
ctx.obj["github"] = GithubController(
3544
paths=ctx.obj["paths"],
3645
token=token,

0 commit comments

Comments
 (0)