Last fixes

This commit is contained in:
T'rahk Rokym 2025-04-21 16:31:39 +02:00
parent fd84f7fe15
commit c9b07c12a0
3 changed files with 6 additions and 4 deletions

View File

@ -16,7 +16,7 @@ from .models import NameFormatConfig
def get_extension_logger(name): def get_extension_logger(name):
""" """
Takes the name of a plugin/extension and generates a child logger of the extensions logger 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. The logging level is determined by the level defined for the parent logger.

View File

@ -20,7 +20,7 @@ register = template.Library()
# cache timers # cache timers
TAG_CACHE_TIME = 3600 # 1 hours TAG_CACHE_TIME = 3600 # 1 hours
NOTIFICATION_CACHE_TIME = 10 # 5 minutes NOTIFICATION_CACHE_TIME = 300 # 5 minutes
# timeout for all requests # timeout for all requests
REQUESTS_TIMEOUT = 5 # 5 seconds REQUESTS_TIMEOUT = 5 # 5 seconds
# max pages to be fetched from gitlab # max pages to be fetched from gitlab
@ -213,7 +213,7 @@ def _current_version_summary() -> dict:
has_current_beta = \ has_current_beta = \
current_version <= latest_beta_version \ current_version <= latest_beta_version \
and latest_patch_version <= latest_beta_version \ and latest_patch_version <= latest_beta_version \
if latest_beta_version else False if latest_beta_version else False
response = { response = {
'latest_patch': has_latest_patch, '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()) logger.debug(request.json())
# https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28 # 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']): if not ('link' in request.headers and 'rel=\"next\"' in request.headers['link']):
break break

View File

@ -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` 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} ```{eval-rst}
.. autoclass:: allianceauth.services.hooks.AppAnnouncementHook.RepositoryKind .. autoclass:: allianceauth.services.hooks.AppAnnouncementHook.RepositoryKind
:members: GITLAB, GITHUB :members: GITLAB, GITHUB