From abd93bbac78a8d73172499d09993f08cea239584 Mon Sep 17 00:00:00 2001 From: Andrey Sokolovskiy Date: Wed, 12 Jun 2024 23:03:55 +0700 Subject: [PATCH] test sites list --- __init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index b2b96de..4d71f01 100644 --- a/__init__.py +++ b/__init__.py @@ -41,6 +41,7 @@ class GitlabPipelineSkill(Skill): async def _get_help(self): return_text = f"*Help*\n" return_text = f"{return_text}```/gitlab help - returns this help screen```\n" + return_text = f"{return_text}```/gitlab sites - returns avaiable gitlab sites```\n" return_text = f"{return_text}```/gitlab list projects - Returns project keywords and urls```\n" return_text = f"{return_text}```/gitlab pipeline last - Returns name, status and id for last pipeline in specific project```\n" # return_text = f"{return_text}```gitlab update inventory - Updates inventory sources for inventory in specific project```\n" @@ -59,4 +60,7 @@ class GitlabPipelineSkill(Skill): async def list_help(self, message): help_print = await self._get_help() - await message.respond(f"{help_print}") + @match_regex(r"^/gitlab sites$") + async def list_gitlab_sites(self, message): + sites_print = [i["site"] for i in self.config.sites] + await message.respond(f"{sites_print}")