mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-29 06:28:23 +02:00
fix(repos): drop Description residue surfaced after rebase on #1929
Project-resource github_repo lift path (#1929) and registerTaskRepos both still constructed RepoData{...Description: ...} after the rebase. Two test sites in daemon_test.go and execenv_test.go also reintroduced the field. Strip them so the Description-removal change builds and tests pass with the latest main.
This commit is contained in:
@@ -441,7 +441,7 @@ func (d *Daemon) registerTaskRepos(workspaceID string, repos []RepoData) {
|
||||
continue
|
||||
}
|
||||
ws.taskRepoURLs[url] = struct{}{}
|
||||
toSync = append(toSync, RepoData{URL: url, Description: repo.Description})
|
||||
toSync = append(toSync, RepoData{URL: url})
|
||||
}
|
||||
d.mu.Unlock()
|
||||
|
||||
|
||||
@@ -677,7 +677,7 @@ func TestRegisterTaskReposAllowsProjectOnlyURL(t *testing.T) {
|
||||
// the only repo URL the agent should be able to check out.
|
||||
d.workspaces["ws-1"] = newWorkspaceState("ws-1", nil, "", nil, nil)
|
||||
|
||||
d.registerTaskRepos("ws-1", []RepoData{{URL: sourceRepo, Description: "project repo"}})
|
||||
d.registerTaskRepos("ws-1", []RepoData{{URL: sourceRepo}})
|
||||
|
||||
// The async clone goroutine in registerTaskRepos may not have finished;
|
||||
// poll briefly until the cache is populated so the test isn't racy.
|
||||
|
||||
@@ -217,7 +217,7 @@ func TestProjectReposReplaceWorkspaceReposInMetaSkill(t *testing.T) {
|
||||
ProjectID: "22222222-3333-4444-5555-666666666666",
|
||||
ProjectTitle: "Project A",
|
||||
Repos: []RepoContextForEnv{
|
||||
{URL: "https://github.com/org/project-repo", Description: ""},
|
||||
{URL: "https://github.com/org/project-repo"},
|
||||
},
|
||||
ProjectResources: []ProjectResourceForEnv{
|
||||
{
|
||||
|
||||
@@ -911,11 +911,7 @@ func (h *Handler) ClaimTaskByRuntime(w http.ResponseWriter, r *http.Request) {
|
||||
URL string `json:"url"`
|
||||
}
|
||||
if json.Unmarshal(row.ResourceRef, &payload) == nil && payload.URL != "" {
|
||||
desc := ""
|
||||
if row.Label.Valid {
|
||||
desc = row.Label.String
|
||||
}
|
||||
projectRepos = append(projectRepos, RepoData{URL: payload.URL, Description: desc})
|
||||
projectRepos = append(projectRepos, RepoData{URL: payload.URL})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user