Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookup of source facts no longer works with GitHub organisation #1864

Closed
wragge opened this issue Aug 12, 2020 · 6 comments
Closed

Lookup of source facts no longer works with GitHub organisation #1864

wragge opened this issue Aug 12, 2020 · 6 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@wragge
Copy link
Sponsor

wragge commented Aug 12, 2020

Description

If repo_url points to a GitHub organisation no source facts are retrieved. Looking in the js console, there's a 404 error as the theme is requesting the organisation name from the GitHub repos endpoint

Expected behavior

The number of repositories belonging to the organisation should be displayed under the repository name. This is what happened in earlier versions.

Actual behavior

No source facts are displayed.

Steps to reproduce the bug

  1. Set repo_url to a GitHub organisation url

Package versions

  • Python: 3.8.2
  • MkDocs: 1.1.2
  • Material: 5.5.5
@squidfunk squidfunk added the bug Issue reports a bug label Aug 12, 2020
@squidfunk
Copy link
Owner

You're right, this got lost somehow in the v5 rewrite and is definitely a bug. Should be quite easy to fix, though.

@squidfunk
Copy link
Owner

squidfunk commented Aug 12, 2020

Turns out, it's only a bug in the regex. The second capturing group missed a ?. WIll be part of the next release which I'll do tonight or tomorrow 😊

@squidfunk squidfunk reopened this Aug 12, 2020
@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Aug 12, 2020
@squidfunk
Copy link
Owner

Released as part of 5.5.6.

@crazy-max
Copy link
Contributor

crazy-max commented Aug 19, 2020

@squidfunk I just noticed that the repo stats are no longer displayed (stars, forks). Is this related to this change?

image

Oh looks like I hit the API rate limit:

image

@squidfunk
Copy link
Owner

The results from the GitHub API call are persisted in session storage (not local storage), so it's per browser tab/session. If you open and close your browser too often, you get 429ed by GitHub 😅

@crazy-max
Copy link
Contributor

Yeah I need to calm down 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants