[red-hat-jboss-eap] Automation version retrieval (#414)

red-hat-jboss-eap-7.py retrieves all the 7.x versions based on https://access.redhat.com/articles/2332721.

red-hat-jboss-eap-8.py retrieves only the last 8.x version based on https://maven.repository.redhat.com/ga/org/jboss/eap/channels/eap-8.0/maven-metadata.xml (the version date is approximated using the lastUpdated tag).

---------

Co-authored-by: Denis Fuenzalida 🐙 <defuenza@microsoft.com>
Co-authored-by: Marc Wrobel <marc.wrobel@gmail.com>
This commit is contained in:
Denis Fuenzalida
2025-05-02 08:31:12 -07:00
committed by GitHub
parent 2453b431e3
commit 54ef082add
3 changed files with 58 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ def parse_datetime(text: str, formats: list[str] = frozenset([
"%Y-%m-%dT%H:%M:%S.%f%z", # 2023-05-01T08:32:34.123456Z
"%Y/%m/%d %H:%M:%S", # 2023/05/01 08:32:34
"%a %d %b %Y %H:%M:%S %Z", # Wed, 01 Jan 2020 00:00:00 GMT
"%Y%m%d%H%M%S", # 20230501083234
]), to_utc: bool = True) -> datetime:
"""Parse a given text representing a datetime using a list of formats,
optionally converting it to UTC.