| Age | Commit message (Collapse) | Author |
|
|
|
Parses grit files. I tried using serde-xml-rs but it can't handle
text mixed with elements so xml-rs and event stream it is.
|
|
|
|
Add logs
Add remote keys for each user
|
|
|
|
Sets up a whole slew of docker instances, all started from clean
slate for test.
|
|
Only the owner or a maintainer of the project can remove a review.
Removing a review also removes the git branch.
Only reviews that are either draft or dropped can be removed.
|
|
|
|
Apparently it is still needed when the root package only has
one binary.
|
|
|
|
|
|
Git treats most of a config name as case-insensitive.
Specifically section and value are case-insenstive while optional
subsection, if it exists, is case-sensitive.
So, in "a.b.c" a and c will be made lowercase but not b before
checking the cache. And in "a.b" both a and b will be made lowercase
|
|
Wanted to include a non-bare repo as well but git doesn't like one
adding a non-bare git repo NOT as a submodule. And bare repos are
the main code path anyway.
|
|
Arguments go after action "build".
|
|
Add coverage for common as well as server.
Fix fs_utils::create_dir_allow_existing to fail if entry exists but
isn't a dir.
|
|
|
|
But also add /review endpoint that takes an id. So you can get
review data with either the reviewid or the branchname.
|
|
Having to include --feature=build-server in basically all commands
that wasn't building eyeballs-githook got tiring quickly.
Instead, use workspaces, with a separate project for building
the githook. It means I also had to add a library common with
code shared by both githook and server.
|
|
To make a githook that can run on alpine images (using musl) they
need to be cross-compiled. Then it became apparent that the githook
binary was pulling in all the same dependencies as the server was.
This is not good, but apparently also not something Rust/Cargo has
figured out. RFC:s has been shutdown. workspace might be an option
but then I probably need to also add a "code shared by both githook
and server" library that both can link. Problem for another day.
|
|
|
|
|
|
Next step is to generate authorized_keys files for git server
based on keys.
|
|
|
|
|
|
|
|
hooks handle delete and fast forward rules.
|
|
Want to support any authentication for the git server, so use git
commiter as username for creating reviews instead of the local user
that logged in to git.
Also verify that pushed commits has a valid author in pre-receive.
This is tricky as pre-receive must do this check in the hook, because
pre-receive runs when before the objects are pushed so the server
can't read the commits, the hook must do this.
|
|
Re-release of 8.1.1 apparently.
|
|
|
|
|
|
Use testdir to create directories to put test git in.
Use custom test method to find githook binary.
Stop using remote so that git repo doesn't try to fetch.
|
|
|
|
Pushing a commit to a new branch creates a review.
Each project has its own git directory, with githooks installed
that talkes with server process via unix sockets.
|
|
Apperntly, cargo sqlx prepare --all is not enough, we need:
cargo sqlx prepare -- --all-targets --all-features
|
|
Forgot a sqlx query
|
|
Not great, but works. Needs `cargo install grcov` and
`rustup component add llvm-tools-preview` to work.
|
|
Non existent projects, users and such.
|
|
User: username must be unique, use as primary key and drop id.
|
|
Avoid having to have an active server and a migrated database
to be able to build.
Instead, when a new query is added or the database updated,
cargo sqlx prepare needs to be run again, then with a running
server and an active database. But only then.
|
|
|
|
Preparing for git connection.
|
|
auth module switching implementation based on cfg(test)
|
|
|
|
|
|
Non-test auth is now using ldap for account syncing and authentication.
Test auth is still using hardcoded users (user and other). But it is
now also possible to login as "other".
|
|
As both compiling, tests and well, running, needs mariadb setup
add a docker image for it. Also prepare for ldap support by adding
a openldap image as well.
Included .env as well, used by sqlx when compiling query!.
|
|
Use project_check_maintainer correctly, should not panic (by .unwrap)
but forward the error (by ?).
|
|
Also add /users endpoint.
|
|
Must be <version>_<description>.sql.
|
|
While doing that I realized I had forgotten to declare maintainers
for projects. Also added default roles and changed so that review_users
only contains overrides, so that changes to the project users is
instantly applied to all reviews (unless there is an override).
|