aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_create.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/op_create.go')
-rw-r--r--bug/op_create.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/bug/op_create.go b/bug/op_create.go
index d63d6d2f..9bb40d35 100644
--- a/bug/op_create.go
+++ b/bug/op_create.go
@@ -7,7 +7,7 @@ import (
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/identity"
- "github.com/MichaelMure/git-bug/util/git"
+ "github.com/MichaelMure/git-bug/repository"
"github.com/MichaelMure/git-bug/util/text"
"github.com/MichaelMure/git-bug/util/timestamp"
)
@@ -17,9 +17,9 @@ var _ Operation = &CreateOperation{}
// CreateOperation define the initial creation of a bug
type CreateOperation struct {
OpBase
- Title string `json:"title"`
- Message string `json:"message"`
- Files []git.Hash `json:"files"`
+ Title string `json:"title"`
+ Message string `json:"message"`
+ Files []repository.Hash `json:"files"`
}
// Sign-post method for gqlgen
@@ -57,7 +57,7 @@ func (op *CreateOperation) Apply(snapshot *Snapshot) {
}
}
-func (op *CreateOperation) GetFiles() []git.Hash {
+func (op *CreateOperation) GetFiles() []repository.Hash {
return op.Files
}
@@ -98,9 +98,9 @@ func (op *CreateOperation) UnmarshalJSON(data []byte) error {
}
aux := struct {
- Title string `json:"title"`
- Message string `json:"message"`
- Files []git.Hash `json:"files"`
+ Title string `json:"title"`
+ Message string `json:"message"`
+ Files []repository.Hash `json:"files"`
}{}
err = json.Unmarshal(data, &aux)
@@ -119,7 +119,7 @@ func (op *CreateOperation) UnmarshalJSON(data []byte) error {
// Sign post method for gqlgen
func (op *CreateOperation) IsAuthored() {}
-func NewCreateOp(author identity.Interface, unixTime int64, title, message string, files []git.Hash) *CreateOperation {
+func NewCreateOp(author identity.Interface, unixTime int64, title, message string, files []repository.Hash) *CreateOperation {
return &CreateOperation{
OpBase: newOpBase(CreateOp, author, unixTime),
Title: title,
@@ -141,7 +141,7 @@ func Create(author identity.Interface, unixTime int64, title, message string) (*
return CreateWithFiles(author, unixTime, title, message, nil)
}
-func CreateWithFiles(author identity.Interface, unixTime int64, title, message string, files []git.Hash) (*Bug, *CreateOperation, error) {
+func CreateWithFiles(author identity.Interface, unixTime int64, title, message string, files []repository.Hash) (*Bug, *CreateOperation, error) {
newBug := NewBug()
createOp := NewCreateOp(author, unixTime, title, message, files)