Loading src/cli/entrypoint.py +15 −3 Changes for src/cli/entrypoint.py: 15 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -125,8 +125,10 @@ class Entrypoint: # Get parent description parent_description: str = '' parent_name: str = '' if parent_group: parent_description = parent_group.description parent_name = parent_group.name # Show group details group_type = 'subgroup' if subgroup else 'group' Loading @@ -144,8 +146,14 @@ class Entrypoint: # Update group description elif options.update_description: parent_description_text: str = '' if parent_name: parent_description_text = ' - ' + GitLabFeature.Helper.describe( parent_description, parent_name, ) description = f'{GitLabFeature.Helper.capitalize(group.name)}' \ f' - {parent_description}' f'{parent_description_text}' gitlab.group_set_description(criteria, description) print(f'{Colors.BOLD} - Updated description: ' f'{Colors.CYAN}{description}' Loading Loading @@ -198,11 +206,15 @@ class Entrypoint: # Update project description elif options.update_description: group_description = GitLabFeature.Helper.describe( group.description, group.name, ) description = f'{GitLabFeature.Helper.capitalize(project.name)}' \ f' - {group.description}' f' - {group_description}' gitlab.project_set_description(criteria, description) print(f'{Colors.BOLD} - Updated description: ' f'{Colors.CYAN}{description}' f'{Colors.CYAN}{group_description}' f'{Colors.RESET}') # Reset project features Loading src/features/gitlab.py +10 −0 Changes for src/features/gitlab.py: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -325,3 +325,13 @@ class GitLabFeature: @staticmethod def capitalize(text: str) -> str: return f'{text[:1].capitalize()}{text[1:]}' # Describe @staticmethod def describe( description: str, name: str, ) -> str: if description: return description return GitLabFeature.Helper.capitalize(name) Loading
src/cli/entrypoint.py +15 −3 Changes for src/cli/entrypoint.py: 15 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -125,8 +125,10 @@ class Entrypoint: # Get parent description parent_description: str = '' parent_name: str = '' if parent_group: parent_description = parent_group.description parent_name = parent_group.name # Show group details group_type = 'subgroup' if subgroup else 'group' Loading @@ -144,8 +146,14 @@ class Entrypoint: # Update group description elif options.update_description: parent_description_text: str = '' if parent_name: parent_description_text = ' - ' + GitLabFeature.Helper.describe( parent_description, parent_name, ) description = f'{GitLabFeature.Helper.capitalize(group.name)}' \ f' - {parent_description}' f'{parent_description_text}' gitlab.group_set_description(criteria, description) print(f'{Colors.BOLD} - Updated description: ' f'{Colors.CYAN}{description}' Loading Loading @@ -198,11 +206,15 @@ class Entrypoint: # Update project description elif options.update_description: group_description = GitLabFeature.Helper.describe( group.description, group.name, ) description = f'{GitLabFeature.Helper.capitalize(project.name)}' \ f' - {group.description}' f' - {group_description}' gitlab.project_set_description(criteria, description) print(f'{Colors.BOLD} - Updated description: ' f'{Colors.CYAN}{description}' f'{Colors.CYAN}{group_description}' f'{Colors.RESET}') # Reset project features Loading
src/features/gitlab.py +10 −0 Changes for src/features/gitlab.py: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -325,3 +325,13 @@ class GitLabFeature: @staticmethod def capitalize(text: str) -> str: return f'{text[:1].capitalize()}{text[1:]}' # Describe @staticmethod def describe( description: str, name: str, ) -> str: if description: return description return GitLabFeature.Helper.capitalize(name)