Avoid unused line statistics when refreshing merge facts
This commit is contained in:
@@ -123,11 +123,10 @@ func (m *Manager) gitFacts(ctx context.Context, t api.Task, p api.Project) (stor
|
||||
if err != nil {
|
||||
return g, err
|
||||
}
|
||||
all, err := git.Compare(t.WorktreePath, p.DefaultBranch, "HEAD", tree, "")
|
||||
g.UnmergedFiles, err = git.ChangedFileCount(t.WorktreePath, p.DefaultBranch, tree)
|
||||
if err != nil {
|
||||
return g, err
|
||||
}
|
||||
g.UnmergedFiles = len(all.Files)
|
||||
latest, err := m.store.LastReviewable(ctx, t.Id)
|
||||
if errors.Is(err, store.ErrNotFound) {
|
||||
return g, nil
|
||||
|
||||
Reference in New Issue
Block a user