diff options
author | Michael Muré <batolettre@gmail.com> | 2022-11-29 13:01:53 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-11-29 13:01:53 +0100 |
commit | 4a341b5e1714a6a36ec7f5839a6a1b73571d4851 (patch) | |
tree | 261e108d1c9bd78e15e19379f611cfecb900fef5 /entities/bug/bug_actions.go | |
parent | 0ac39a7ab5db077fcf0df827e32bf6e625e980da (diff) | |
download | git-bug-4a341b5e1714a6a36ec7f5839a6a1b73571d4851.tar.gz |
WIP
Diffstat (limited to 'entities/bug/bug_actions.go')
-rw-r--r-- | entities/bug/bug_actions.go | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/entities/bug/bug_actions.go b/entities/bug/bug_actions.go index c25b9243..198e4ed0 100644 --- a/entities/bug/bug_actions.go +++ b/entities/bug/bug_actions.go @@ -23,33 +23,14 @@ func Push(repo repository.Repo, remote string) (string, error) { // Note: an author is necessary for the case where a merge commit is created, as this commit will // have an author and may be signed if a signing key is available. func Pull(repo repository.ClockedRepo, resolvers entity.Resolvers, remote string, mergeAuthor identity.Interface) error { - return dag.Pull(def, repo, resolvers, remote, mergeAuthor) + return dag.Pull(def, wrapper, repo, resolvers, remote, mergeAuthor) } // MergeAll will merge all the available remote bug // Note: an author is necessary for the case where a merge commit is created, as this commit will // have an author and may be signed if a signing key is available. func MergeAll(repo repository.ClockedRepo, resolvers entity.Resolvers, remote string, mergeAuthor identity.Interface) <-chan entity.MergeResult { - out := make(chan entity.MergeResult) - - go func() { - defer close(out) - - results := dag.MergeAll(def, repo, resolvers, remote, mergeAuthor) - - // wrap the dag.Entity into a complete Bug - for result := range results { - result := result - if result.Entity != nil { - result.Entity = &Bug{ - Entity: result.Entity.(*dag.Entity), - } - } - out <- result - } - }() - - return out + return dag.MergeAll(def, wrapper, repo, resolvers, remote, mergeAuthor) } // Remove will remove a local bug from its entity.Id |