MCPcopy Create free account
hub / github.com/git-bug/git-bug / Apply

Method Apply

entities/bug/op_set_status.go:25–39  ·  view source on GitHub ↗
(snapshot *Snapshot)

Source from the content-addressed store, hash-verified

23}
24
25func (op *SetStatusOperation) Apply(snapshot *Snapshot) {
26 snapshot.Status = op.Status
27 snapshot.addActor(op.Author())
28
29 id := op.Id()
30 item := &SetStatusTimelineItem{
31 // id: id,
32 combinedId: entity.CombineIds(snapshot.Id(), id),
33 Author: op.Author(),
34 UnixTime: timestamp.Timestamp(op.UnixTime),
35 Status: op.Status,
36 }
37
38 snapshot.Timeline = append(snapshot.Timeline, item)
39}
40
41func (op *SetStatusOperation) Validate() error {
42 if err := op.OpBase.Validate(op, SetStatusOp); err != nil {

Callers

nothing calls this directly

Calls 6

IdMethod · 0.95
CombineIdsFunction · 0.92
TimestampTypeAlias · 0.92
addActorMethod · 0.80
AuthorMethod · 0.65
IdMethod · 0.65

Tested by

no test coverage detected