fix: разрешить формат owner/repo в имени репозитория (E3 был слишком строг, слэш ≠ эскейп)
All checks were successful
CI / test (push) Successful in 50s
CI / build-and-package (amd64, linux) (push) Successful in 40s
CI / build-and-package (amd64, windows) (push) Successful in 45s

This commit is contained in:
Hermes
2026-08-16 23:00:56 +05:00
parent 4044c0866f
commit 35d9a74ef1
2 changed files with 20 additions and 3 deletions

View File

@@ -416,14 +416,14 @@ func TestWorkerPromptRendered(t *testing.T) {
}
func TestValidateRepoName(t *testing.T) {
valid := []string{"calc", "proj-a", "my.repo", "node_2"}
valid := []string{"calc", "proj-a", "my.repo", "node_2", "kamelion/ratatoskr-go", "a/b/c"}
for _, r := range valid {
if err := validateRepoName(r); err != nil {
t.Errorf("validateRepoName(%q) = %v, want nil", r, err)
}
}
invalid := []string{"", "../etc", "a/b", "a/../b", ".."}
invalid := []string{"", "../etc", "etc/..", "a/../b", "..", ".", "/etc", "a//b", "./x"}
for _, r := range invalid {
if err := validateRepoName(r); err == nil {
t.Errorf("validateRepoName(%q) = nil, want E3", r)