File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,11 @@ async def get_default_token() -> str:
7070@click .version_option (VERSION )
7171@click .option (
7272 "--github-server" ,
73- default = asyncio .run (get_default_github_server ()),
73+ default = lambda : asyncio .run (get_default_github_server ()),
7474)
7575@click .option (
7676 "--token" ,
77- default = asyncio .run (get_default_token ()),
77+ default = lambda : asyncio .run (get_default_token ()),
7878 help = "GitHub personal access token" ,
7979)
8080@click .pass_context
Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ async def edit() -> None:
7575 "--keep-pull-request-title-and-body" ,
7676 "-k" ,
7777 is_flag = True ,
78- default = asyncio .run (utils .get_default_keep_pr_title_body ()),
78+ # NOTE: `flag_value` here is used to allow the default's lazy loading with `is_flag`
79+ flag_value = True ,
80+ default = lambda : asyncio .run (utils .get_default_keep_pr_title_body ()),
7981 help = "Don't update the title and body of already opened pull requests. "
8082 "Default fetched from git config if added with `git config --add mergify-cli.stack-keep-pr-title-body true`" ,
8183)
@@ -87,7 +89,7 @@ async def edit() -> None:
8789 "--trunk" ,
8890 "-t" ,
8991 type = click .UNPROCESSED ,
90- default = asyncio .run (utils .get_trunk ()),
92+ default = lambda : asyncio .run (utils .get_trunk ()),
9193 callback = trunk_type ,
9294 help = "Change the target branch of the stack." ,
9395)
@@ -168,7 +170,7 @@ async def push( # noqa: PLR0913, PLR0917
168170 "--trunk" ,
169171 "-t" ,
170172 type = click .UNPROCESSED ,
171- default = asyncio .run (utils .get_trunk ()),
173+ default = lambda : asyncio .run (utils .get_trunk ()),
172174 callback = trunk_type ,
173175 help = "Change the target branch of the stack." ,
174176)
You can’t perform that action at this time.
0 commit comments