From ed0fb1b4bb0b7c21ea61d6ed84197b692b02905a Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 27 Aug 2024 09:08:51 +0200 Subject: [PATCH] set default value for default branch --- nf_core/pipelines/create/create.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index 8fbb049088..c102441c3c 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -56,7 +56,7 @@ def __init__( template_config: Optional[Union[CreateConfig, str, Path]] = None, organisation: str = "nf-core", from_config_file: bool = False, - default_branch: Optional[str] = None, + default_branch: str = "main", is_interactive: bool = False, ) -> None: if isinstance(template_config, CreateConfig): @@ -431,7 +431,7 @@ def get_default_branch(self) -> None: ) # default to main except configparser.Error: log.debug("Could not read init.defaultBranch") - if self.default_branch is not None and self.default_branch in ["dev", "TEMPLATE"]: + if self.default_branch in ["dev", "TEMPLATE"]: raise UserWarning( f"Your Git defaultBranch '{self.default_branch}' is incompatible with nf-core.\n" "'dev' and 'TEMPLATE' can not be used as default branch name.\n"