Age | Commit message (Collapse) | Author |
|
|
|
Check the repository description that comes back from the GitHub API
against our cached description in the database. Only write the new
description if it changed so we can avoid writing to the file in that
case.
|
|
Forgot to add commas when I added the additional fields.
|
|
This is simpler, and means we don't have to check if the database file
exists and only initialise if it doesn't. Here, we can just run the code
and trust it will do the right thing in both cases.
|
|
Store the repository description so we can check whether the description
was updated and copy it in our mirror accordingly.
|
|
If we haven't encountered a repository yet, mirror it to the filesystem.
Change `From<github::Repo>` to `From<&github::Repo>` so we don't consume
the repo and can use it later in the repo list loop.
|
|
If the repo was updated since we last cached it, update the `updated_at`
column to the new value so we know that we fetched the latest.
|
|
I think I like this better than checking the `RowNotFound` error.
|
|
Find out if the latest copy is more recent than the cached value in our
database.
|
|
Get rid of the boxed errors to make matching on errors easier.
|
|
|
|
Also change `repo_insert()` to take only a single repo instead of a
slice of them.
|
|
|
|
Sqlx already returns an appropriate error if no row was found.
|
|
|
|
Set up the database with a table for repositories so we can cache when
they were last updated.
|
|
|