Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <[email protected]>
  • Loading branch information
jortel committed Dec 15, 2023
1 parent 5b8e3f4 commit 94cac32
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions api/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"strconv"
"strings"
"time"
"k8s.io/utils/strings/slices"
)

//
Expand Down Expand Up @@ -642,9 +643,11 @@ func (r *Task) injectFiles(db *gorm.DB) (err error) {
content,
"> "+s)
}
snipA := slices.Clone(r.Activity[:ref.Index])
snipB := slices.Clone(r.Activity[ref.Index:])
r.Activity = append(
append(r.Activity[:ref.Index], content...),
r.Activity[ref.Index:]...)
append(snipA, content...),
snipB...)
}
return
}
Expand Down Expand Up @@ -717,6 +720,9 @@ func (r *TaskReport) Model() (m *model.TaskReport) {
//
// Attachment task report attached file ref.
type Attachment struct {
Ref `yaml:",inline"`
// Ref references an attached File.
Ref `yaml:",inline"`
// Index 1-based association with an activity entry.
// Zero(0) indicates not associated.
Index int `json:"index,omitempty" yaml:",omitempty"`
}

0 comments on commit 94cac32

Please sign in to comment.