aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_pack.go
blob: e3d64e72b95c62c5f3ff36714c91a0fa040be033 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package bug

// OperationPack represent an ordered set of operation to apply
// to a Bug. These operations are stored in a single Git commit.
//
// These commits will be linked together in a linear chain of commits
// inside Git to form the complete ordered chain of operation to
// apply to get the final state of the Bug
type OperationPack struct {
	Operations []Operation
}

// Append a new operation to the pack
func (opp *OperationPack) Append(op Operation) {
	opp.Operations = append(opp.Operations, op)
}

func (opp *OperationPack) IsValid() bool {
	return len(opp.Operations) > 0
}