add(taskwarrior): pull implementation for new tasks

This implements the pull functionality for new tasks, which are not yet
in the local taskwarrior instance created. WIP for #3.
This commit is contained in:
2023-10-21 12:43:41 +02:00
parent 3ed3c53854
commit ba9683f290
5 changed files with 113 additions and 14 deletions

View File

@@ -35,6 +35,14 @@ type Annotation struct {
Entry string `json:"entry,omitempty"`
}
func (task *Task) AppendComment(description string, time time.Time) {
annotation := Annotation{
Description: description,
Entry: GoTimeToTaskTime(time),
}
task.Annotations = append(task.Annotations, annotation)
}
func NewTask(description string, project string, git_id uint, git_type Type, tags ...string) Task {
// TODO: update task struct to include the new user defined value, which shall
// also be provided as an argument