gitea/docs/content/doc/usage
Kyle D 8220e50b56
Substitute variables in path names of template repos too (#25294)
### Summary

Extend the template variable substitution to replace file paths. This
can be helpful for setting up log files & directories that should match
the repository name.

### PR Changes

 - Move files matching glob pattern when setting up repos from template
- For security, added ~escaping~ sanitization for cross-platform support
and to prevent directory traversal (thanks @silverwind for the
reference)
 - Added unit testing for escaping function 
- Fixed the integration tests for repo template generation by passing
the repo_template_id
- Updated the integration testfiles to add some variable substitution &
assert the outputs

I had to fix the existing repo template integration test and extend it
to add a check for variable substitutions.

Example:

![image](https://github.com/go-gitea/gitea/assets/12700993/621feb09-0ef3-460e-afa8-da74cd84fa4e)
2023-06-20 21:14:47 +00:00
..
actions Docs about how to generate config for act runner with docker and setup it with docker-compose (#25256) 2023-06-16 11:46:59 +08:00
packages Add chinese documentations for cran package registry (#25012) 2023-05-31 14:14:31 +08:00
_index.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
_index.zh-cn.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
_index.zh-tw.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
agit-support.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
agit-support.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
authentication.en-us.md Update LDAP filters to include both username and email address (#24547) 2023-05-05 14:18:53 -04:00
authentication.zh-cn.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
authentication.zh-tw.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
clone-filter.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
clone-filter.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
code-owners.en-us.md Add codeowners feature (#24910) 2023-06-08 16:56:05 +08:00
incoming-email.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
incoming-email.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
issue-pull-request-templates.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
issue-pull-request-templates.zh-cn.md Remove unnecessary usage prefix from doc titles (#24869) 2023-05-23 18:14:57 +08:00
labels.en-us.md Fix link to customizing-gitea (#25056) 2023-06-03 04:27:40 +02:00
labels.zh-cn.md Fix link to customizing-gitea (#25056) 2023-06-03 04:27:40 +02:00
linked-references.en-us.md Replace N/A with - everywhere (#24474) 2023-05-02 05:54:29 -04:00
linked-references.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
merge-message-templates.en-us.md Merge message template support for rebase without merge commit (#22669) 2023-05-22 09:01:46 +08:00
merge-message-templates.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
permissions.en-us.md improve permission documentation (#23942) 2023-06-05 15:43:17 +08:00
permissions.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
profile-readme.en-us.md Remove unnecessary usage prefix from doc titles (#24869) 2023-05-23 18:14:57 +08:00
profile-readme.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
protected-tags.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
protected-tags.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
pull-request.en-us.md simple docs fixes: 'pull request' page (en-us & zh-tw) link path to 'issue-pull-request-templates' (#24961) 2023-05-28 10:47:05 +02:00
pull-request.zh-cn.md Remove unnecessary usage prefix from doc titles (#24869) 2023-05-23 18:14:57 +08:00
pull-request.zh-tw.md simple docs fixes: 'pull request' page (en-us & zh-tw) link path to 'issue-pull-request-templates' (#24961) 2023-05-28 10:47:05 +02:00
push.en-us.md Remove unnecessary usage prefix from doc titles (#24869) 2023-05-23 18:14:57 +08:00
push.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
push.zh-tw.md Fix broken links in documents (#24630) 2023-05-10 12:34:16 +00:00
repo-mirror.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
repo-mirror.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
secrets.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
secrets.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
template-repositories.en-us.md Substitute variables in path names of template repos too (#25294) 2023-06-20 21:14:47 +00:00
template-repositories.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
webhooks.en-us.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00
webhooks.zh-cn.md zh-cn translation for usage docs (#24897) 2023-05-25 04:33:38 +00:00
webhooks.zh-tw.md Refactor docs (#23752) 2023-04-28 11:33:41 +08:00