From d2e25188ccd5f0eb63d58ada97373ecfd3361712 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer Date: Mon, 13 Nov 2023 09:06:08 +0100 Subject: [PATCH] support metrics configuration --- templates/environment.env.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/templates/environment.env.j2 b/templates/environment.env.j2 index 68454f3..a7c924c 100644 --- a/templates/environment.env.j2 +++ b/templates/environment.env.j2 @@ -305,3 +305,18 @@ GITEA__actions__ENABLED={{ gitea_vars.actions.enabled }} GITEA__actions__DEFAULT_ACTIONS_URL={{ gitea_vars.actions.default_actions_url }} {% endif %} {% endif %} {# /actions #} + +{% if 'metrics' in gitea_vars %} +{% if 'enabled' in gitea_vars['metrics'] %} +GITEA__metrics__ENABLED={{ gitea_vars.metrics.enabled }} +{% endif %} +{% if 'enabled_issue_by_label' in gitea_vars['metrics'] %} +GITEA__metrics__ENABLED_ISSUE_BY_LABEL={{ gitea_vars.metrics.enabled_issue_by_label }} +{% endif %} +{% if 'enabled_issue_by_repository' in gitea_vars['metrics'] %} +GITEA__metrics__ENABLED_ISSUE_BY_REPOSITORY={{ gitea_vars.metrics.enabled_issue_by_repository }} +{% endif %} +{% if 'token' in gitea_vars['metrics'] %} +GITEA__metrics__TOKEN={{ gitea_vars.metrics.token }} +{% endif %} +{% endif %} {# /actions #}