Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-05-30 | main: If repo was updated, save new `updated_at` value | Teddy Wing | |
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. | |||
2021-05-30 | database::repo_is_updated: Use `fetch_optional` | Teddy Wing | |
I think I like this better than checking the `RowNotFound` error. | |||
2021-05-30 | Check if repo was updated based on `updated_at` timestamp | Teddy Wing | |
Find out if the latest copy is more recent than the cached value in our database. | |||
2021-05-30 | main: If repo is not in database, insert it | Teddy Wing | |
2021-05-30 | database: Use a custom `Error` type | Teddy Wing | |
Get rid of the boxed errors to make matching on errors easier. | |||
2021-05-30 | main: Add test `Repo` data | Teddy Wing | |
Will be using this to implement the main logic. | |||
2021-05-30 | database: Implement `From<github::Repo>` for `database::Repo` | Teddy Wing | |
2021-05-30 | database: Change `GithubRepo` arguments to `Repo` | Teddy Wing | |
Also change `repo_insert()` to take only a single repo instead of a slice of them. | |||
2021-05-30 | database::Repo: Make `id` non-optional | Teddy Wing | |
2021-05-30 | database::repo_get: Don't need my own error for empty row | Teddy Wing | |
Sqlx already returns an appropriate error if no row was found. | |||
2021-05-30 | database: Add a way to get a single repo | Teddy Wing | |
2021-05-29 | Create SQLite database | Teddy Wing | |
Set up the database with a table for repositories so we can cache when they were last updated. | |||
2021-05-29 | Start setting up database interface | Teddy Wing | |
2021-05-29 | src/git.rs: Add function documentation | Teddy Wing | |
2021-05-29 | github::fetch_repos(): Remove `unwrap`s | Teddy Wing | |
2021-05-29 | Move `Repo` to `github` module | Teddy Wing | |
Makes more sense here rather than in its own module since it models GitHub's repository structure. | |||
2021-05-29 | Add function to update a Git repository | Teddy Wing | |
Should work like: $ git remote update From what I can tell from: https://github.com/git/git/blob/a0dda6023ed82b927fa205c474654699a5b07a82/builtin/remote.c#L1452-L1490 this translates to something like: $ git fetch --prune --multiple default --all | |||
2021-05-29 | git::mirror(): Extract arguments | Teddy Wing | |
Move hard-coded repository values to function arguments. | |||
2021-05-29 | Work out how to mirror a Git repository | Teddy Wing | |
Based on the guide here: https://libgit2.org/docs/guides/101-samples/#repositories_clone_mirror References: https://github.com/libgit2/libgit2sharp/issues/577 https://github.com/libgit2/libgit2.github.io/pull/31 | |||
2021-05-29 | Split GitHub API request into separate files | Teddy Wing | |
2021-05-29 | Parse GitHub API response to a struct | Teddy Wing | |
2021-05-29 | Move headers into HTTP client instead of request | Teddy Wing | |
2021-05-29 | Make a test request to the GitHub API to get user repos | Teddy Wing | |
2021-05-29 | New Rust v1.50.0 project | Teddy Wing | |