7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'app/controllers/locale_ninja/dashboard_controller.rb', line 7
def index
@locales_count = LocaleHelper.locales_count(@client)
@repo = @client.repo_infomation
translation_branches = @client.branches.filter { |branch| branch.ends_with?('__translations') }
@branches_count = @client.branches.count - translation_branches.count
@commits_count = translation_branches.sum do |branch|
@client.client.commits_since(@client.repository_fullname,
1.month.ago.strftime('%Y-%m-%d'),
sha_or_branch: branch
).count
end
end
|