aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2021-05-30main: If repo was updated, save new `updated_at` valueTeddy 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-30database::repo_is_updated: Use `fetch_optional`Teddy Wing
I think I like this better than checking the `RowNotFound` error.
2021-05-30Check if repo was updated based on `updated_at` timestampTeddy Wing
Find out if the latest copy is more recent than the cached value in our database.
2021-05-30main: If repo is not in database, insert itTeddy Wing
2021-05-30database: Use a custom `Error` typeTeddy Wing
Get rid of the boxed errors to make matching on errors easier.
2021-05-30main: Add test `Repo` dataTeddy Wing
Will be using this to implement the main logic.
2021-05-30database: Implement `From<github::Repo>` for `database::Repo`Teddy Wing
2021-05-30database: 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-30database::Repo: Make `id` non-optionalTeddy Wing
2021-05-30database::repo_get: Don't need my own error for empty rowTeddy Wing
Sqlx already returns an appropriate error if no row was found.
2021-05-30database: Add a way to get a single repoTeddy Wing
2021-05-29Create SQLite databaseTeddy Wing
Set up the database with a table for repositories so we can cache when they were last updated.
2021-05-29Start setting up database interfaceTeddy Wing
2021-05-29src/git.rs: Add function documentationTeddy Wing
2021-05-29github::fetch_repos(): Remove `unwrap`sTeddy Wing
2021-05-29Move `Repo` to `github` moduleTeddy Wing
Makes more sense here rather than in its own module since it models GitHub's repository structure.
2021-05-29Add function to update a Git repositoryTeddy 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-29git::mirror(): Extract argumentsTeddy Wing
Move hard-coded repository values to function arguments.
2021-05-29Work out how to mirror a Git repositoryTeddy 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-29Split GitHub API request into separate filesTeddy Wing
2021-05-29Parse GitHub API response to a structTeddy Wing
2021-05-29Move headers into HTTP client instead of requestTeddy Wing
2021-05-29Make a test request to the GitHub API to get user reposTeddy Wing
2021-05-29New Rust v1.50.0 projectTeddy Wing