github-pr-stats
github-pr-stats copied to clipboard
ZeroDivisionError: division by zero on stats['count']
This is only solved if I enable "issues" on the repo
$ github-pr-stats --basic
Traceback (most recent call last):
File "/usr/local/bin/github-pr-stats", line 151, in
I have the same issue
Traceback (most recent call last):
File "/usr/local/bin/github-pr-stats", line 151, in
Did you find any solution plz ?
The solution is to remove the .has_issues()
check from line 81. It really makes no sense to skip analyzing pull requests when issues are disabled.
Still happening :( The workaround from @mgorny doesn't help either.
$ github-pr-stats --basic https://github.com/libopencm3/libopencm3
Traceback (most recent call last):
File "/home/karlp/src/libopencm3/.env/bin/github-pr-stats", line 151, in <module>
bucketSize=arguments['--bucketSize'], plugins=arguments['--plugins'], url=githubUrl)
File "/home/karlp/src/libopencm3/.env/lib/python2.7/site-packages/github_pr_stats/github_pr_stats.py", line 165, in analyze
percentageMerged = 100 * (stats['merged'] / stats['count'])
ZeroDivisionError: division by zero
I tweaked the L166 to get the percentage right in that case. Still I faced other bugs here and there