Adicionar painel de importação de projetos para o Gitea

Novo menu "Importar" que permite selecionar um diretório do servidor,
navegar pela árvore de pastas, criar um repositório no Gitea e copiar
os arquivos respeitando .gitignore, sem alterar o projeto original.
This commit is contained in:
Frederico Castro
2026-02-28 05:16:09 -03:00
parent 884e8802bd
commit 8a9a3d7988
6 changed files with 591 additions and 1 deletions

View File

@@ -149,6 +149,11 @@ const API = {
branches(name) { return API.request('GET', `/repos/${encodeURIComponent(name)}/branches`); },
},
projects: {
browse(path) { return API.request('GET', `/browse?path=${encodeURIComponent(path || '/home')}`); },
import(sourcePath, repoName) { return API.request('POST', '/projects/import', { sourcePath, repoName }); },
},
files: {
list(path) { return API.request('GET', `/files${path ? '?path=' + encodeURIComponent(path) : ''}`); },
delete(path) { return API.request('DELETE', `/files?path=${encodeURIComponent(path)}`); },