You've already forked gitea_exporter
mirror of
https://github.com/Lunik/gitea_prometheus_exporter.git
synced 2025-07-30 08:23:06 +03:00
@ -5,7 +5,10 @@ def get_repo_commit_count(gitea, repo):
|
||||
|
||||
response = gitea.requests.get(gitea.url + "/api/v1" + page_endpoint + "?limit=1", headers=gitea.headers, params={})
|
||||
|
||||
return int(response.headers.get('X-Total'))
|
||||
if 'X-Total' in response.headers:
|
||||
return int(response.headers.get('X-Total'))
|
||||
else:
|
||||
return 0
|
||||
|
||||
def gitea_export(app):
|
||||
metrics = dict()
|
||||
|
Reference in New Issue
Block a user