Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mergify_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ async def get_default_token() -> str:
@click.version_option(VERSION)
@click.option(
"--github-server",
default=asyncio.run(get_default_github_server()),
default=lambda: asyncio.run(get_default_github_server()),
)
@click.option(
"--token",
default=asyncio.run(get_default_token()),
default=lambda: asyncio.run(get_default_token()),
help="GitHub personal access token",
)
@click.pass_context
Expand Down
8 changes: 5 additions & 3 deletions mergify_cli/stack/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ async def edit() -> None:
"--keep-pull-request-title-and-body",
"-k",
is_flag=True,
default=asyncio.run(utils.get_default_keep_pr_title_body()),
# NOTE: `flag_value` here is used to allow the default's lazy loading with `is_flag`
flag_value=True,
default=lambda: asyncio.run(utils.get_default_keep_pr_title_body()),
help="Don't update the title and body of already opened pull requests. "
"Default fetched from git config if added with `git config --add mergify-cli.stack-keep-pr-title-body true`",
)
Expand All @@ -87,7 +89,7 @@ async def edit() -> None:
"--trunk",
"-t",
type=click.UNPROCESSED,
default=asyncio.run(utils.get_trunk()),
default=lambda: asyncio.run(utils.get_trunk()),
callback=trunk_type,
help="Change the target branch of the stack.",
)
Expand Down Expand Up @@ -168,7 +170,7 @@ async def push( # noqa: PLR0913, PLR0917
"--trunk",
"-t",
type=click.UNPROCESSED,
default=asyncio.run(utils.get_trunk()),
default=lambda: asyncio.run(utils.get_trunk()),
callback=trunk_type,
help="Change the target branch of the stack.",
)
Expand Down