Merge pull request #153 from aaditkamat/detect-branch

Detect main branch
This commit is contained in:
Anmol Pratap Singh
2021-01-16 13:44:07 +05:30
committed by GitHub

View File

@@ -454,7 +454,8 @@ def get_stats(github):
yearly_data = loc.calculateLoc()
loc.plotLoc(yearly_data)
stats += '**' + translate['Timeline'] + '**\n\n'
stats = stats + '![Chart not found](https://raw.githubusercontent.com/' + username + '/' + username + '/master/charts/bar_graph.png) \n\n'
branch_name = github.get_repo(f'{username}/{username}').default_branch
stats = stats + '![Chart not found](https://raw.githubusercontent.com/' + username + '/' + username + '/' + branch_name + '/charts/bar_graph.png) \n\n'
return stats