feat: множественные репозитории (Repos) и клонирование в воркере
All checks were successful
CI / test (push) Successful in 46s
CI / build-and-package (amd64, darwin) (push) Successful in 36s
CI / build-and-package (amd64, linux) (push) Successful in 37s
CI / build-and-package (amd64, windows) (push) Successful in 44s
CI / build-and-package (arm64, darwin) (push) Successful in 35s
CI / build-and-package (arm64, linux) (push) Successful in 36s
All checks were successful
CI / test (push) Successful in 46s
CI / build-and-package (amd64, darwin) (push) Successful in 36s
CI / build-and-package (amd64, linux) (push) Successful in 37s
CI / build-and-package (amd64, windows) (push) Successful in 44s
CI / build-and-package (arm64, darwin) (push) Successful in 35s
CI / build-and-package (arm64, linux) (push) Successful in 36s
- Task.Repos []string (XML-колонка repos, обратная совместимость с repo)
- config: блок git {base_url, token}
- аналитик: ответ repos[], шаблон показывает список
- core: propose без repos → возврат в сбор (E1)
- worker вариант A: один dev из общего cwd, prepareRepos клонирует
недостающие репо (git clone), validateRepoName (E3), ErrRepoNotGit (E4)
- ошибки E1-E4 в worker/errors.go
This commit is contained in:
@@ -31,7 +31,8 @@ type AnalystResponse struct {
|
||||
Phase string `json:"phase"`
|
||||
Title string `json:"title"`
|
||||
Goal string `json:"goal"`
|
||||
Repo string `json:"repo"`
|
||||
Repo string `json:"repo"` // одиночный репо (обратная совместимость)
|
||||
Repos []string `json:"repos"` // список репо (основной)
|
||||
Why string `json:"why"`
|
||||
AC string `json:"ac"`
|
||||
Questions []string `json:"questions"`
|
||||
@@ -57,7 +58,7 @@ func (a *Analyst) Decide(ctx context.Context, history []core.Message, draft stor
|
||||
td := TemplateData{
|
||||
Title: draft.Title,
|
||||
Goal: draft.Goal,
|
||||
Repo: draft.Repo,
|
||||
Repos: draft.EffectiveRepos(),
|
||||
Why: draft.Why,
|
||||
AC: draft.AC,
|
||||
History: hist,
|
||||
@@ -114,6 +115,11 @@ func (a *Analyst) Decide(ctx context.Context, history []core.Message, draft stor
|
||||
if ar.Repo != "" {
|
||||
dec.Draft.Repo = ar.Repo
|
||||
}
|
||||
if len(ar.Repos) > 0 {
|
||||
dec.Draft.Repos = ar.Repos
|
||||
// Синхронизируем одиночный repo для старых потребителей.
|
||||
dec.Draft.Repo = strings.Join(ar.Repos, ",")
|
||||
}
|
||||
if ar.Why != "" {
|
||||
dec.Draft.Why = ar.Why
|
||||
}
|
||||
@@ -148,7 +154,7 @@ func validateResponse(ar *AnalystResponse) error {
|
||||
return fmt.Errorf("phase=ask, но нет ни chat_reply, ни questions")
|
||||
}
|
||||
case "propose":
|
||||
if ar.Title == "" && ar.Goal == "" && ar.Repo == "" && ar.Why == "" && ar.AC == "" {
|
||||
if ar.Title == "" && ar.Goal == "" && len(ar.Repos) == 0 && ar.Why == "" && ar.AC == "" {
|
||||
return fmt.Errorf("phase=propose, но нет ни одного изменённого поля")
|
||||
}
|
||||
case "abort":
|
||||
|
||||
Reference in New Issue
Block a user