diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2019-06-18 17:20:11 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2019-06-28 16:22:35 +0300 |
commit | ca5cd7b7fb5108d30d0f6b74e31da736024592dd (patch) | |
tree | aec9468afa579b128b7e09f6e78e7357d6413b85 /app/views/projects/branches/_branch.html.haml | |
parent | 546355f734f74c040d0ef0917ade50751fd90731 (diff) | |
download | gitlab-ce-ca5cd7b7fb5108d30d0f6b74e31da736024592dd.tar.gz |
Add endpoint for fetching diverging commit countsid-stale-branches
Extract diverging_commit_counts into a service class
Diffstat (limited to 'app/views/projects/branches/_branch.html.haml')
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 3638334d61c..f97b259f8f2 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -1,6 +1,6 @@ - merged = local_assigns.fetch(:merged, false) - commit = @repository.commit(branch.dereferenced_target) -- diverging_commit_counts = @repository.diverging_commit_counts(branch) +- diverging_commit_counts = Branches::DivergingCommitCountsService.new(@repository).call(branch) - number_commits_distance = diverging_commit_counts[:distance] - number_commits_behind = diverging_commit_counts[:behind] - number_commits_ahead = diverging_commit_counts[:ahead] |