aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_set_status.go
diff options
context:
space:
mode:
authorMichael Muré <michael.mure@consensys.net>2018-11-21 18:56:12 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:35:36 +0100
commitfeab9412dffe5772048aad29893c4cb01d566387 (patch)
treeb7bc9751f2ebdf8d41f5621bbf372eaf7625c4b9 /bug/op_set_status.go
parent0aefae6fcca5786f2c898029c3d6282f760f2c63 (diff)
downloadgit-bug-feab9412dffe5772048aad29893c4cb01d566387.tar.gz
WIP identity in git
Diffstat (limited to 'bug/op_set_status.go')
-rw-r--r--bug/op_set_status.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/bug/op_set_status.go b/bug/op_set_status.go
index 54f476cb..9fc64e52 100644
--- a/bug/op_set_status.go
+++ b/bug/op_set_status.go
@@ -1,6 +1,7 @@
package bug
import (
+ "github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/util/git"
"github.com/pkg/errors"
)
@@ -56,7 +57,7 @@ func (op *SetStatusOperation) Validate() error {
// Sign post method for gqlgen
func (op *SetStatusOperation) IsAuthored() {}
-func NewSetStatusOp(author Person, unixTime int64, status Status) *SetStatusOperation {
+func NewSetStatusOp(author identity.Interface, unixTime int64, status Status) *SetStatusOperation {
return &SetStatusOperation{
OpBase: newOpBase(SetStatusOp, author, unixTime),
Status: status,
@@ -65,7 +66,7 @@ func NewSetStatusOp(author Person, unixTime int64, status Status) *SetStatusOper
type SetStatusTimelineItem struct {
hash git.Hash
- Author Person
+ Author identity.Interface
UnixTime Timestamp
Status Status
}
@@ -75,7 +76,7 @@ func (s SetStatusTimelineItem) Hash() git.Hash {
}
// Convenience function to apply the operation
-func Open(b Interface, author Person, unixTime int64) (*SetStatusOperation, error) {
+func Open(b Interface, author identity.Interface, unixTime int64) (*SetStatusOperation, error) {
op := NewSetStatusOp(author, unixTime, OpenStatus)
if err := op.Validate(); err != nil {
return nil, err
@@ -85,7 +86,7 @@ func Open(b Interface, author Person, unixTime int64) (*SetStatusOperation, erro
}
// Convenience function to apply the operation
-func Close(b Interface, author Person, unixTime int64) (*SetStatusOperation, error) {
+func Close(b Interface, author identity.Interface, unixTime int64) (*SetStatusOperation, error) {
op := NewSetStatusOp(author, unixTime, ClosedStatus)
if err := op.Validate(); err != nil {
return nil, err