-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open
Description
- I've read the contribution guidelines and agree with them
I've found a bug and checked that ...
- ... the problem doesn't occur with the default MkDocs template
- ... the problem is not in any of my customizations (CSS, JS, template)
- ... the documentation does not mention anything about my problem (it confirms it -- see below)
- ... there are no open or closed issues that are related to my problem (there is a closed issue that I think is related -- see below)
Description
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.
Expected behavior
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]
Actual behavior
Now, 0 Stars • 0 Forks is shown when given a private repository (regardless of the actual number of stars or forks).
Steps to reproduce the bug
- Provide a value for
repo_urlthat points at a private GitHub repository (or a nonexistent repo). - Build and serve the site.
- Browser: clear session storage.
- Navigate to the site with the console open.
- Observe a GitHub API request sent for the repo; for a private repo, GH returns a 404.
- Observe that the GitHub icon has "0 Stars 0 Forks" underneath it.
- Observe in session storage, the following value is set:
["0 Stars","0 Forks"].
Package versions
- Python: 2.7.4
- MkDocs: 1.1.2
- Material: 6.1.6
Project configuration
... # somewhere in mkdocs.yml
repo_url: https://github.com/some-repo-that-is/private-or-does-not-exist
... # rest of fileSystem information
(should be irrelevant for this issue)
- OS: macOS 10.13.6 / site built with docker
python:3.7image - Browser: Chrome 86
Metadata
Metadata
Assignees
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open