From 8b418b07730f3ad9aacc8b36ff92df888f2cc26c Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 17 Nov 2021 23:36:40 -0800 Subject: [PATCH 1/8] Add sort to dependents example link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 7750ce88755f44aa10301889642205311a8c6c4d Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 1 Dec 2021 11:34:22 -0800 Subject: [PATCH 2/8] Fixed incorrect help on get command --- github_to_sqlite/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_to_sqlite/cli.py b/github_to_sqlite/cli.py index fbd3321..70aa3b5 100644 --- a/github_to_sqlite/cli.py +++ b/github_to_sqlite/cli.py @@ -539,7 +539,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 From bc9763d1206df2cfb2dab4d6e0fb0c7f02408ba2 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 1 Dec 2021 11:36:52 -0800 Subject: [PATCH 3/8] Release 2.8.3 Refs #59, #61 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(): From 751bc900366ca52e662ea383b858cbf4365093d9 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 6 Jan 2022 09:19:02 -0800 Subject: [PATCH 4/8] datasette-atom plugin I'm going to see if I can subscribe to new issues and issue comments across all of these repos. --- .github/workflows/deploy-demo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 9e3169f..a4ec773 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -115,4 +115,5 @@ jobs: --install=datasette-json-html \ --install=datasette-vega \ --install=datasette-render-images \ - --install=datasette-graphql + --install=datasette-graphql \ + --install=datasette-atom From a6e237f75a4b86963d91dcb5c9582e3a1b3349d6 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 21 Mar 2022 18:59:45 -0700 Subject: [PATCH 5/8] google-github-actions/setup-gcloud@v0 --- .github/workflows/deploy-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index a4ec773..a99880f 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -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 }} From dbac2e5dd8a562b45d8255a265859cf8020ca22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AB=E3=82=B7=E3=82=AA=E3=80=80=E9=87=91=E5=9F=8E?= =?UTF-8?q?=E3=80=80=E5=A4=A7=E9=96=A2?= <1224205+empjustine@users.noreply.github.com> Date: Mon, 18 Jul 2022 16:40:11 -0300 Subject: [PATCH 6/8] Fixing 'NoneType' object has no attribute 'items' (#73) Traceback (most recent call last): File "/home/dogsheep/dogsheep/github-to-sqlite/bin/github-to-sqlite", line 8, in sys.exit(cli()) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/github_to_sqlite/cli.py", line 181, in starred utils.save_stars(db, user, stars) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/github_to_sqlite/utils.py", line 494, in save_stars repo_id = save_repo(db, repo) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/github_to_sqlite/utils.py", line 308, in save_repo to_save["owner"] = save_user(db, to_save["owner"]) File "/home/dogsheep/dogsheep/github-to-sqlite/lib64/python3.10/site-packages/github_to_sqlite/utils.py", line 229, in save_user for key, value in user.items() AttributeError: 'NoneType' object has no attribute 'items' --- github_to_sqlite/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/github_to_sqlite/utils.py b/github_to_sqlite/utils.py index bae4ac6..c7d78d7 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 From ace13ec3d98090d99bd71871c286a4a612c96a50 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 18 Jul 2022 12:47:17 -0700 Subject: [PATCH 7/8] Drop py-gfm from demo, refs #74 --- .github/workflows/deploy-demo.yml | 1 - demo-metadata.json | 20 ++++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index a99880f..5b40f13 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -108,7 +108,6 @@ 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 \ 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" - ] + } } } } From 0e45b72312a0756e5a562effbba08cb8de1e480b Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 28 Sep 2022 14:07:54 -0700 Subject: [PATCH 8/8] datasette-pretty-json>=0.2.2 Refs https://github.com/simonw/datasette-pretty-json/issues/2 --- .github/workflows/deploy-demo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 5b40f13..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: @@ -110,7 +110,7 @@ jobs: --branch=main \ --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 \