dogsheep / github-to-sqlite

Save data from GitHub to a SQLite database
https://github-to-sqlite.dogsheep.net/
Apache License 2.0
405 stars 43 forks source link

Issue comments don't appear to populate issues foreign key #32

Closed simonw closed 4 years ago

simonw commented 4 years ago

https://github-to-sqlite.dogsheep.net/github?sql=select+html_url%2C+id%2C+issue+from+issue_comments+order+by+updated_at+desc+limit+101

Screen Shot 2020-04-21 at 12 16 57 PM
simonw commented 4 years ago

That's because I just broke this code:

https://github.com/dogsheep/github-to-sqlite/blob/2cf75a0a036719eb7e57fdc7c5c2ea0f4c26978a/github_to_sqlite/utils.py#L131-L139

It expects the repo column to be simonw/datasette but it's now an ID instead.

I should add a test for this as part of the fix.

simonw commented 4 years ago

Caused by #31.

simonw commented 4 years ago

https://github-to-sqlite.dogsheep.net/github?sql=select+html_url%2C+id%2C+issue+from+issue_comments+order+by+updated_at+desc+limit+101 now shows issues.

And https://github-to-sqlite.dogsheep.net/github/issue_comments links to them:

Screen Shot 2020-04-21 at 6 17 33 PM