From 3c0c03d54aa14336dd1f9f73efcaaed07614d995 Mon Sep 17 00:00:00 2001 From: Matthieu Monsch Date: Thu, 15 May 2025 08:35:57 -0700 Subject: [PATCH] fix: support git-defined default bot --- src/git_draft/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git_draft/__main__.py b/src/git_draft/__main__.py index 62cf0d1..904e069 100644 --- a/src/git_draft/__main__.py +++ b/src/git_draft/__main__.py @@ -175,7 +175,7 @@ async def run() -> None: # noqa: PLR0912 PLR0915 bot_config = None bot_name = opts.bot or repo.default_bot() if bot_name: - bot_configs = [c for c in config.bots if c.name == opts.bot] + bot_configs = [c for c in config.bots if c.name == bot_name] if len(bot_configs) != 1: raise ValueError(f"Found {len(bot_configs)} matching bots") bot_config = bot_configs[0]