you can either use existing SDK or at least make a wrapper for requests so that you do not repeat the same exception handling block over and over again (smth like in https://review.opendev.org/c/zuul/zuul/+/850008/10/zuul/driver/gitea/giteaconnection.py#364 or in https://github.com/opentelekomcloud/ansible-collection-gitcontrol/tree/main/plugins/module_utils)
can you pls add argument to specify whether return yaml or json? human reading json is very bad
pls decide on function naming convention, get_gitea_failed_commits fits more other functions
actually instead of that I was expecting rather going through current metadata analyzing only repositories that we care about (smth like in any other script). Please adapt to to consume metadata and rather take parameters “environment” which is then set in the metadata