From 9f867af9cae76a6648b1a3b9d9ad387d7bc9b50e Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 21 Mar 2021 23:45:20 +0100 Subject: [PATCH] reorder Issue and pull request attachments variables --- README.md | 6 ++++++ defaults/main.yml | 4 ++++ templates/gitea.ini.j2 | 12 ++++++------ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ceaf5be..3cadbf3 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,12 @@ Here is a deeper insight into the variables of this gitea role. For the exact fu | `gitea_disable_gravatar` | `true` | Do you want to disable Gravatar ? (privacy and so on) (true/false) | | `gitea_picture_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[picture]` section of the config. | +### Issue and pull request attachments ([attachment](https://docs.gitea.io/en-us/config-cheat-sheet/#issue-and-pull-request-attachments-attachment)) +| variable name | default value | description | +| ------------- | ------------- | ----------- | +| `attachment_enabled` | `true` | Whether issue and pull request attachments are enabled. | +| `gitea_attachment_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[attachment]` section of the config. | + diff --git a/defaults/main.yml b/defaults/main.yml index e94ab31..3001339 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -112,6 +112,10 @@ gitea_session_extra_config: '' gitea_disable_gravatar: true gitea_picture_extra_config: '' +# Issue and pull request attachments (attachment) +gitea_attachment_enabled: true +gitea_picture_extra_config: '' + # security gitea_lfs_jwt_secret: '' gitea_oauth2_jwt_secret: '' diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index 4b579a0..d45d6dd 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -137,14 +137,14 @@ DISABLE_GRAVATAR = {{ gitea_disable_gravatar | ternary('true', 'false') }} {{ gitea_picture_extra_config }} ; ; -; - +; -> https://docs.gitea.io/en-us/config-cheat-sheet/#issue-and-pull-request-attachments-attachment [attachment] -; Whether attachments are enabled. Defaults to `true` -ENABLED = true -; Path for attachments. Defaults to `data/attachments` +ENABLED = {{ gitea_attachment_enabled | ternary('true', 'false') }} PATH = {{ gitea_home }}/data/attachments - +{{ gitea_attachment_extra_config }} +; +; +; [log] ROOT_PATH = {{ gitea_home }}/log ; Either "console", "file", "conn", "smtp" or "database", default is "console"