Loading src/cli/entrypoint.py +1 −0 Changes for src/cli/entrypoint.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ class Entrypoint: ) print(f'{Colors.BOLD} - GitLab host: ' f'{Colors.GREEN}{gitlab.url}' f'{Colors.CYAN} ({gitlab.username})' f'{Colors.RESET}') Platform.flush() Loading src/features/gitlab.py +11 −4 Changes for src/features/gitlab.py: 11 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -948,6 +948,11 @@ class GitLabFeature: # Result return label # URL @property def url(self) -> str: return str(self.__gitlab.api_url) # User def user( self, Loading @@ -956,9 +961,11 @@ class GitLabFeature: users = self.__gitlab.users.list(all=True, iterator=True, username=criteria) for user in users: return cast(User, user) raise RuntimeError() raise RuntimeError(f'Could not find user {criteria}') # URL # User name @property def url(self) -> str: return str(self.__gitlab.api_url) def username(self) -> str: if self.__gitlab.user: return str(self.__gitlab.user.username) return '/' Loading
src/cli/entrypoint.py +1 −0 Changes for src/cli/entrypoint.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ class Entrypoint: ) print(f'{Colors.BOLD} - GitLab host: ' f'{Colors.GREEN}{gitlab.url}' f'{Colors.CYAN} ({gitlab.username})' f'{Colors.RESET}') Platform.flush() Loading
src/features/gitlab.py +11 −4 Changes for src/features/gitlab.py: 11 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -948,6 +948,11 @@ class GitLabFeature: # Result return label # URL @property def url(self) -> str: return str(self.__gitlab.api_url) # User def user( self, Loading @@ -956,9 +961,11 @@ class GitLabFeature: users = self.__gitlab.users.list(all=True, iterator=True, username=criteria) for user in users: return cast(User, user) raise RuntimeError() raise RuntimeError(f'Could not find user {criteria}') # URL # User name @property def url(self) -> str: return str(self.__gitlab.api_url) def username(self) -> str: if self.__gitlab.user: return str(self.__gitlab.user.username) return '/'