From 7fbd1ee6eb5d31fd73f22737a75487405d6842f9 Mon Sep 17 00:00:00 2001 From: "snorkell-ai[bot]" <146478655+snorkell-ai[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 16:32:29 +0000 Subject: [PATCH] [Snorkell.ai]: Documentation for azure_devops.py --- src/azure_devops.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/azure_devops.py b/src/azure_devops.py index cadff2f..835e2c6 100644 --- a/src/azure_devops.py +++ b/src/azure_devops.py @@ -9,6 +9,15 @@ # base_url = "https://f0a8-2401-4900-1f26-31a3-b5b1-65c0-2624-a5e9.ngrok-free.app" async def notify_error(message): + """ Notify about an error to the GithubClient. + + Args: + message (str): The error message to be notified. + + Returns: + None + """ + message = f"GithubClient alert:\n {message}" print(message) other_vars = { @@ -53,6 +62,20 @@ async def initiate_documentation_generation( async def check_documentation_generation_status(headers, data): + """ Check the status of documentation generation. + + Args: + headers (dict): The headers to be included in the request. + data (dict): The data to be sent in the request. + + Returns: + None + + Raises: + Exception: If the request to the API fails or times out. + Exception: If the documentation generation fails. + """ + url = f"{base_url}/api/app/azDevops/status/documentation" count = 0 while count < 360: