From 5511c230b678a181cc596238bf6669428d1b1902 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 18 Aug 2022 23:34:05 +0200 Subject: move {bug,identity} to /entities, move input to /commands --- api/graphql/resolvers/mutation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/graphql/resolvers/mutation.go') diff --git a/api/graphql/resolvers/mutation.go b/api/graphql/resolvers/mutation.go index aa99e93d..6ad81db4 100644 --- a/api/graphql/resolvers/mutation.go +++ b/api/graphql/resolvers/mutation.go @@ -7,8 +7,8 @@ import ( "github.com/MichaelMure/git-bug/api/auth" "github.com/MichaelMure/git-bug/api/graphql/graph" "github.com/MichaelMure/git-bug/api/graphql/models" - "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/cache" + "github.com/MichaelMure/git-bug/entities/bug" "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/util/text" ) -- cgit From 45b04351d8d02e53b3401b0ee23f7cbe750b63cd Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Mon, 3 May 2021 11:45:15 +0200 Subject: bug: have a type for combined ids, fix https://github.com/MichaelMure/git-bug/issues/653 --- api/graphql/resolvers/mutation.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'api/graphql/resolvers/mutation.go') diff --git a/api/graphql/resolvers/mutation.go b/api/graphql/resolvers/mutation.go index 6ad81db4..f6296d63 100644 --- a/api/graphql/resolvers/mutation.go +++ b/api/graphql/resolvers/mutation.go @@ -9,7 +9,6 @@ import ( "github.com/MichaelMure/git-bug/api/graphql/models" "github.com/MichaelMure/git-bug/cache" "github.com/MichaelMure/git-bug/entities/bug" - "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/util/text" ) @@ -177,7 +176,12 @@ func (r mutationResolver) AddCommentAndReopen(ctx context.Context, input models. } func (r mutationResolver) EditComment(ctx context.Context, input models.EditCommentInput) (*models.EditCommentPayload, error) { - repo, b, err := r.getBug(input.RepoRef, input.Prefix) + repo, err := r.getRepo(input.RepoRef) + if err != nil { + return nil, err + } + + b, target, err := repo.ResolveComment(input.TargetPrefix) if err != nil { return nil, err } @@ -190,7 +194,7 @@ func (r mutationResolver) EditComment(ctx context.Context, input models.EditComm op, err := b.EditCommentRaw( author, time.Now().Unix(), - entity.Id(input.Target), + target, text.Cleanup(input.Message), nil, ) -- cgit