From c9b07c12a0c6446fb3d8f4030602d25384ccf8ea Mon Sep 17 00:00:00 2001 From: T'rahk Rokym Date: Mon, 21 Apr 2025 16:31:39 +0200 Subject: [PATCH] Last fixes --- allianceauth/services/hooks.py | 2 +- allianceauth/templatetags/admin_status.py | 6 +++--- docs/development/custom/app-announcement-hooks.md | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/allianceauth/services/hooks.py b/allianceauth/services/hooks.py index b0c3b718..75ed30dc 100644 --- a/allianceauth/services/hooks.py +++ b/allianceauth/services/hooks.py @@ -16,7 +16,7 @@ from .models import NameFormatConfig def get_extension_logger(name): """ Takes the name of a plugin/extension and generates a child logger of the extensions logger - to be used by the extension to log events to the extensions + to be used by the extension to log events to the extensions logger. The logging level is determined by the level defined for the parent logger. diff --git a/allianceauth/templatetags/admin_status.py b/allianceauth/templatetags/admin_status.py index 320f2ed4..6768a9a7 100644 --- a/allianceauth/templatetags/admin_status.py +++ b/allianceauth/templatetags/admin_status.py @@ -20,7 +20,7 @@ register = template.Library() # cache timers TAG_CACHE_TIME = 3600 # 1 hours -NOTIFICATION_CACHE_TIME = 10 # 5 minutes +NOTIFICATION_CACHE_TIME = 300 # 5 minutes # timeout for all requests REQUESTS_TIMEOUT = 5 # 5 seconds # max pages to be fetched from gitlab @@ -213,7 +213,7 @@ def _current_version_summary() -> dict: has_current_beta = \ current_version <= latest_beta_version \ and latest_patch_version <= latest_beta_version \ - if latest_beta_version else False + if latest_beta_version else False response = { 'latest_patch': has_latest_patch, @@ -319,7 +319,7 @@ def _fetch_list_from_github(url: str, max_pages: int = MAX_PAGES) -> list: logger.debug(request.json()) # https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28 - # See Example creating a pagination metho + # See Example creating a pagination method if not ('link' in request.headers and 'rel=\"next\"' in request.headers['link']): break diff --git a/docs/development/custom/app-announcement-hooks.md b/docs/development/custom/app-announcement-hooks.md index 271f1140..03650a87 100644 --- a/docs/development/custom/app-announcement-hooks.md +++ b/docs/development/custom/app-announcement-hooks.md @@ -38,6 +38,8 @@ A repository with the url `https://gitlab.com/username/appname` will have a name This variable is an enumeration of the class `AppAnnouncemementHook.RepositoryKind` +It is mandatory to specify this variable so alliance auth contacts the correct API when fetching your repository issues. + ```{eval-rst} .. autoclass:: allianceauth.services.hooks.AppAnnouncementHook.RepositoryKind :members: GITLAB, GITHUB