diff options
Diffstat (limited to 'bug/operation_pack.go')
-rw-r--r-- | bug/operation_pack.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bug/operation_pack.go b/bug/operation_pack.go new file mode 100644 index 00000000..e3d64e72 --- /dev/null +++ b/bug/operation_pack.go @@ -0,0 +1,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 +} |