__I've found a bug and checked that ...__
This bug concerns the visibility of the X Stars • X Forks statistic.
I am wondering if the behavior change resulted from the fix for #1864.
Previously (we had been on 5.1.0), the stats were hidden for private repositories -- only the GitHub logo was shown. This is confirmed to be expected by the docs:
Additionally, for GitHub and GitLab, the number of stars and forks is automatically requested and rendered for _public repositories_.
(Emphasis in original) [link]
Now, 0 Stars • 0 Forks is shown when given a private repository (regardless of the actual number of stars or forks).
repo_url that points at a private GitHub repository (or a nonexistent repo).["0 Stars","0 Forks"].... # somewhere in mkdocs.yml
repo_url: https://github.com/some-repo-that-is/private-or-does-not-exist
... # rest of file
(should be irrelevant for this issue)
python:3.7 imageThanks for reporting! Definitely a regression that should be easy to fix:
The problem seems to be that the status code is > 200, but it's not considered an error. Same for GitHub orgs and GitLab.
Fixed in ca05a2d3. The request is now filtered for status === 200. If it doesn't succeed, the response is cached anyway for the duration of the session, as we don't want to flood GitHub's API. Same for GitLab.
Released as part of 6.1.7.