diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 9e3169f..1e77d0a 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: "3.10" - uses: actions/cache@v1 name: Configure pip caching with: @@ -95,7 +95,7 @@ jobs: with: path: github.db - name: Set up Cloud Run - uses: google-github-actions/setup-gcloud@master + uses: google-github-actions/setup-gcloud@v0 with: version: '275.0.0' service_account_email: ${{ secrets.GCP_SA_EMAIL }} @@ -108,11 +108,11 @@ jobs: -m demo-metadata.json \ --service github-to-sqlite \ --branch=main \ - --install=py-gfm \ --install=datasette-search-all>=0.3 \ --install=datasette-render-markdown>=1.1.2 \ - --install=datasette-pretty-json \ + --install=datasette-pretty-json>=0.2.2 \ --install=datasette-json-html \ --install=datasette-vega \ --install=datasette-render-images \ - --install=datasette-graphql + --install=datasette-graphql \ + --install=datasette-atom diff --git a/README.md b/README.md index d4c1f5b..0801ebb 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ The command accepts one or more repositories. Add `-v` for verbose output. -Example: [dependents table](https://github-to-sqlite.dogsheep.net/github/dependents) +Example: [dependents table](https://github-to-sqlite.dogsheep.net/github/dependents?_sort_desc=first_seen_utc) ## Fetching emojis diff --git a/demo-metadata.json b/demo-metadata.json index 293c947..c04aa5a 100644 --- a/demo-metadata.json +++ b/demo-metadata.json @@ -45,10 +45,7 @@ "span": [ "class" ] - }, - "extensions": [ - "mdx_gfm:GithubFlavoredMarkdownExtension" - ] + } } } }, @@ -89,10 +86,7 @@ "span": [ "class" ] - }, - "extensions": [ - "mdx_gfm:GithubFlavoredMarkdownExtension" - ] + } } } }, @@ -138,10 +132,7 @@ "span": [ "class" ] - }, - "extensions": [ - "mdx_gfm:GithubFlavoredMarkdownExtension" - ] + } } } }, @@ -180,10 +171,7 @@ "span": [ "class" ] - }, - "extensions": [ - "mdx_gfm:GithubFlavoredMarkdownExtension" - ] + } } } } diff --git a/github_to_sqlite/cli.py b/github_to_sqlite/cli.py index 864af86..748bd21 100644 --- a/github_to_sqlite/cli.py +++ b/github_to_sqlite/cli.py @@ -564,7 +564,7 @@ def emojis(db_path, auth, fetch): help="Accept header to send, e.g. application/vnd.github.VERSION.html", ) def get(url, auth, paginate, nl, accept): - "Save repos owened by the specified (or authenticated) username or organization" + "Make an authenticated HTTP GET against the specified URL" token = load_token(auth) first = True should_output_closing_brace = not nl diff --git a/github_to_sqlite/utils.py b/github_to_sqlite/utils.py index ca1347f..6f4fd86 100644 --- a/github_to_sqlite/utils.py +++ b/github_to_sqlite/utils.py @@ -223,6 +223,11 @@ def save_pull_requests(db, pull_requests, repo): def save_user(db, user): + # Under some conditions, GitHub caches removed repositories with + # stars and ends up leaving dangling `None` user references. + if user is None: + return None + # Remove all url fields except avatar_url and html_url to_save = { key: value diff --git a/setup.py b/setup.py index d33ead4..1a39f65 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup import os -VERSION = "2.8.2" +VERSION = "2.8.3" def get_long_description():