You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/docs/content/doc
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)
2 years ago
..
administration Fix all possible setting error related storages and added some tests (#23911) 2 years ago
contributing Change branch name from master to main in some documents' links (#25126) 2 years ago
development Add template linting via djlint (#25212) 2 years ago
help Add link to support page for commercial support (#25293) 2 years ago
installation Add Exoscale to installation on cloud provider docs (#25342) 2 years ago
usage Substitute variables in path names of template repos too (#25294) 2 years ago
actions.en-us.md Docs for Gitea Actions (#24405) 2 years ago
administration.en-us.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
administration.fr-fr.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
administration.zh-cn.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
administration.zh-tw.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
contributing.en-us.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
contributing.fr-fr.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
contributing.zh-tw.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
development.en-us.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
development.zh-cn.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
development.zh-tw.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
help.en-us.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
help.fr-fr.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
help.zh-cn.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
help.zh-tw.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
installation.en-us.md Import docs into main repository (#2874) 7 years ago
installation.fr-fr.md General documentation cleanup (#3317) 7 years ago
installation.zh-cn.md Import docs into main repository (#2874) 7 years ago
installation.zh-tw.md Import docs into main repository (#2874) 7 years ago
packages.en-us.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
search.de-de.md Refactor docs (#23752) 2 years ago
search.en-us.md Refactor docs (#23752) 2 years ago
search.fr-fr.md Refactor docs (#23752) 2 years ago
search.nl-nl.md Refactor docs (#23752) 2 years ago
search.pt-br.md Refactor docs (#23752) 2 years ago
search.zh-cn.md Refactor docs (#23752) 2 years ago
search.zh-tw.md Refactor docs (#23752) 2 years ago
usage.en-us.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
usage.zh-cn.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago
usage.zh-tw.md Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629) 2 years ago