vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Test the merge result before landing it
e5478085e5b53a2892d0649d6f07c6f0a5653378 · Keenan Nemetz · 11d ago · parent db5e4382
Test the merge result before landing it A protected branch could receive a non-fast-forward landing whose tree was never built: the gate asked for checks on the request head, and the merge commit was made at landing time. A pushed merge with the right parents but extra content was accepted too. Publish the merge commit under refs/vole/candidates/, test it as the base branch, and make the gate require its results. Approvals name the head and the base branch, so a moved base retests without a new approval. A merger who clicks while that run is still going waits for it instead of clicking again. A pushed merge commit now has to carry exactly the tree a clean merge would produce. Closes: 01M61QQ56TESQ1HTMB1Z5C3733
server/ssh/server.go +15−1
| @@ -392,6 +392,20 @@ func (s *Server) exec(ch xssh.Channel, req *xssh.Request, command, user, fp, rem | |||
| 392 | 392 | exit(ch, s.serveChangeMerge(ch, argv, user, remote)) | |
| 393 | 393 | return | |
| 394 | 394 | } | |
| 395 | // `vole change show` asks the instance about the combined result; the clone has | ||
| 396 | // the commits but not the approvals or run results that answer it. | ||
| 397 | if len(argv) >= 1 && argv[0] == "vole-change-status" { | ||
| 398 | release, ok := s.acquireGitProcess(gitProcessWait) | ||
| 399 | if !ok { | ||
| 400 | s.cfg.Log.Warn("ssh: no git process slot for a status", "user", user) | ||
| 401 | refuse("the server is busy running other git commands; try again shortly") | ||
| 402 | return | ||
| 403 | } | ||
| 404 | defer release() | ||
| 405 | req.Reply(true, nil) | ||
| 406 | exit(ch, s.serveChangeStatus(ch, argv, user, remote)) | ||
| 407 | return | ||
| 408 | } | ||
| 395 | 409 | // The admin API is a fixed command set, not a shell. It is available only to | |
| 396 | 410 | // accounts marked as instance admins. | |
| 397 | 411 | if len(argv) >= 1 && argv[0] == "vole-admin" { | |
| @@ -433,7 +447,7 @@ func (s *Server) exec(ch xssh.Channel, req *xssh.Request, command, user, fp, rem | |||
| 433 | 447 | return | |
| 434 | 448 | } | |
| 435 | 449 | if len(argv) != 2 { | |
| 436 | refuse("only git-upload-pack, git-receive-pack, vole-admin, vole-roster, vole-whoami, vole-runner and vole-change-merge are available") | ||
| 450 | refuse("only git-upload-pack, git-receive-pack, vole-admin, vole-roster, vole-whoami, vole-runner, vole-change-merge and vole-change-status are available") | ||
| 437 | 451 | return | |
| 438 | 452 | } | |
| 439 | 453 | verb := argv[0] | |