Closed simonw closed 10 months ago
https://datasette.io/content/repos?_sort=id&readme__isblank=1 shows three repos with blank READMEs:
simonw/datasette
simonw/datasette-graphql
simonw/datasette-app
That --force-fetch-readmes
flag looks interesting, it does this:
Not sure how I could have ended up with a blank README though.
Maybe there was a glitch in the GitHub API and my code didn't notice that one time?
That seems likely - there's no error checking here:
It looks like that should die with an unhandled exception if the API call fails:
>>> from github_to_sqlite.cli import repos as github_to_sqlite_repos
>>> github_to_sqlite_repos.callback("/tmp/db.db", auth="auth.json", repo=["simonw/datasette-graphql"], readme=True, readme_html=True, usernames=[], load=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/simon/Dropbox/Development/github-to-sqlite/github_to_sqlite/cli.py", line 257, in repos
repo_id = utils.save_repo(db, utils.fetch_repo(full_name, token))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/simon/Dropbox/Development/github-to-sqlite/github_to_sqlite/utils.py", line 302, in fetch_repo
response.raise_for_status()
File "/Users/simon/.local/share/virtualenvs/github-to-sqlite-TxlyxhWj/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.github.com/repos/simonw/datasette-graphql
I'm going to ship the site and see if it picks up that updated README.
It's back now: https://datasette.io/plugins/datasette-graphql
https://datasette.io/plugins/datasette-graphql