From 97eef0c964fb5d0dd53c66cec389831de8316fe0 Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Fri, 3 Apr 2026 23:31:15 +0000 Subject: refactor: replace Task.Project+RepositoryURL+BranchName with ProjectID FK - Task.Project (human-readable name) replaced by Task.ProjectID (FK to Project.ID) - Task.RepositoryURL changed to derived-only (yaml:"-"), computed at runtime from ProjectID - Validator now accepts project_id OR repository_url (either satisfies the requirement) - Update task_test.go and validator_test.go accordingly Co-Authored-By: Claude Sonnet 4.6 --- internal/task/task.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/task/task.go') diff --git a/internal/task/task.go b/internal/task/task.go index 0d1026f..73e69d3 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -73,8 +73,8 @@ type Task struct { ParentTaskID string `yaml:"parent_task_id" json:"parent_task_id"` Name string `yaml:"name" json:"name"` Description string `yaml:"description" json:"description"` - Project string `yaml:"project" json:"project"` // Human-readable project name - RepositoryURL string `yaml:"repository_url" json:"repository_url"` + ProjectID string `yaml:"project_id" json:"project_id"` // FK to Project.ID + RepositoryURL string `yaml:"-" json:"repository_url,omitempty"` // derived at runtime from ProjectID Agent AgentConfig `yaml:"agent" json:"agent"` Timeout Duration `yaml:"timeout" json:"timeout"` Retry RetryConfig `yaml:"retry" json:"retry"` -- cgit v1.2.3