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 and milestone should have foreign key to repo #31

Closed simonw closed 4 years ago

simonw commented 4 years ago

Currently the repo column on those tables is a string simonw/datasette rather than an ID referencing a row in repos.

Originally posted by @simonw in https://github.com/dogsheep/github-to-sqlite/issues/29#issuecomment-616883275

simonw commented 4 years ago

The API just gives us the repository_url: https://api.github.com/repos/simonw/datasette/issues

Mozilla_Firefox_and_Topic__Week_2__Discussion__Submit_your_six_story_points_here

We currently turn that into a simonw/datasette string here: https://github.com/dogsheep/github-to-sqlite/blob/e0e8d8caa9657b04bfb8a2cf16c9b580f38b1805/github_to_sqlite/utils.py#L43-L46

simonw commented 4 years ago

Since this represents a breaking schema change for anyone running SQL queries against these tables, I'm going to do a major version bump to 2.0 when I release this.

simonw commented 4 years ago

https://github-to-sqlite.dogsheep.net/github/milestones now link to repo:

Screen Shot 2020-04-21 at 6 19 03 PM

And so do issues: https://github-to-sqlite.dogsheep.net/github/issues

Screen Shot 2020-04-21 at 6 19 53 PM