Commit fbf2a280 authored by Adrian DC's avatar Adrian DC
Browse files

fix(entrypoint): show '# /' if no description is set

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 37e10809
Loading
Loading
Loading
Loading
Loading
+6 −5
Changes for src/cli/entrypoint.py: 6 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ class Entrypoint:
            group = gitlab.group(gitlab_path)
            print(f'{Colors.BOLD} - GitLab group: '
                  f'{Colors.GREEN}{group.full_path}'
                  f'{Colors.CYAN} # {group.description}'
                  f'{Colors.CYAN} # {group.description if group.description else "/"}'
                  f'{Colors.RESET}')
            print(' ')
            Platform.flush()
@@ -119,9 +119,10 @@ class Entrypoint:
                Platform.flush()
            except (GitlabGetError, TypeError):
                project = gitlab.project(gitlab_path)
                print(f'{Colors.BOLD} - GitLab project: '
                print(
                    f'{Colors.BOLD} - GitLab project: '
                    f'{Colors.GREEN}{project.path_with_namespace}'
                      f'{Colors.CYAN} # {project.description}'
                    f'{Colors.CYAN} # {project.description if project.description else "/"}'
                    f'{Colors.RESET}')
                print(' ')
                Platform.flush()
@@ -296,7 +297,7 @@ class Entrypoint:
        group_type = 'subgroup' if subgroup else 'group'
        print(f'{Colors.BOLD} - GitLab {group_type}: '
              f'{Colors.YELLOW_LIGHT}{group.full_path}'
              f'{Colors.CYAN} # {group.description}'
              f'{Colors.CYAN} # {group.description if group.description else "/"}'
              f'{Colors.RESET}')
        Platform.flush()

@@ -432,7 +433,7 @@ class Entrypoint:
        # Show project details
        print(f'{Colors.BOLD} - GitLab project: '
              f'{Colors.YELLOW_LIGHT}{project.path_with_namespace}'
              f'{Colors.CYAN} # {project.description}'
              f'{Colors.CYAN} # {project.description if project.description else "/"}'
              f'{Colors.RESET}')
        Platform.flush()