(scope toolspkg.Scope)
| 4213 | } |
| 4214 | |
| 4215 | func (i taskCreateInput) spec(scope toolspkg.Scope) taskpkg.CreateTask { |
| 4216 | taskScope := taskpkg.Scope(strings.TrimSpace(i.Scope)) |
| 4217 | workspaceID := strings.TrimSpace(i.WorkspaceID) |
| 4218 | if workspaceID == "" && taskScope.Normalize() == taskpkg.ScopeWorkspace { |
| 4219 | workspaceID = strings.TrimSpace(scope.WorkspaceID) |
| 4220 | } |
| 4221 | return taskpkg.CreateTask{ |
| 4222 | ID: strings.TrimSpace(i.ID), |
| 4223 | Identifier: strings.TrimSpace(i.Identifier), |
| 4224 | Scope: taskScope, |
| 4225 | WorkspaceID: workspaceID, |
| 4226 | NetworkChannel: strings.TrimSpace(i.NetworkChannel), |
| 4227 | Title: strings.TrimSpace(i.Title), |
| 4228 | Description: strings.TrimSpace(i.Description), |
| 4229 | Priority: taskpkg.Priority(strings.TrimSpace(i.Priority)), |
| 4230 | MaxAttempts: cloneIntPtr(i.MaxAttempts), |
| 4231 | Draft: i.Draft, |
| 4232 | ApprovalPolicy: taskpkg.ApprovalPolicy(strings.TrimSpace(i.ApprovalPolicy)), |
| 4233 | Owner: cloneTaskOwner(i.Owner), |
| 4234 | WakeCreator: cloneBoolPtr(i.WakeCreator), |
| 4235 | Metadata: cloneJSON(i.Metadata), |
| 4236 | } |
| 4237 | } |
| 4238 | |
| 4239 | type taskChildCreateInput struct { |
| 4240 | ParentTaskID string `json:"parent_task_id"` |
no test coverage detected