vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Add vole change merge, over an SSH verb
b14a78191909907be833d27d82d215a0319de9e3 · Keenan Nemetz · 14d ago · parent 38b30251
Add vole change merge, over an SSH verb The landing operation existed but only the browser could reach it. The CLI cannot do it from a clone: whether a landing is allowed depends on the repository's ACL, the approvals filed against the request, and the run results, and none of those are in the working tree. So the CLI asks the instance, over the key it already pushes with. The new verb takes a repository path and a request id and answers one line; the server resolves the rules, runs forge/landing.Land, and writes the merge line to the audit log the same way a push does. Merging is the approve capability, and the author is not excluded: landing your own request once somebody else approved it is the point of separating the two. Whether an approval exists is the gate's question, asked inside Land, so the CLI, the browser button and the pre-receive hook cannot disagree about it. The verb accepts the same remote path shape as the git verbs and runs it through the same repository-name check, so a name that would be refused on a push is refused here too. Closes #01M5XF4XWHVMMCQEYENA8X32GK.
server/ssh/server.go +9−1
| @@ -218,6 +218,14 @@ func (s *Server) exec(ch xssh.Channel, req *xssh.Request, command, user, fp, rem | |||
| 218 | 218 | exit(ch, 0) | |
| 219 | 219 | return | |
| 220 | 220 | } | |
| 221 | // `vole change merge` lands a change request. It moves a branch, so the rules | ||
| 222 | // and the run results it needs live here, not in the caller's clone; the verb | ||
| 223 | // takes a repository name and a request id and answers one line. | ||
| 224 | if len(argv) >= 1 && argv[0] == "vole-change-merge" { | ||
| 225 | req.Reply(true, nil) | ||
| 226 | exit(ch, s.serveChangeMerge(ch, argv, user, remote)) | ||
| 227 | return | ||
| 228 | } | ||
| 221 | 229 | // The admin API is a fixed command set, not a shell. It is available only to | |
| 222 | 230 | // accounts marked as instance admins. | |
| 223 | 231 | if len(argv) >= 1 && argv[0] == "vole-admin" { | |
| @@ -259,7 +267,7 @@ func (s *Server) exec(ch xssh.Channel, req *xssh.Request, command, user, fp, rem | |||
| 259 | 267 | return | |
| 260 | 268 | } | |
| 261 | 269 | if len(argv) != 2 { | |
| 262 | refuse("only git-upload-pack, git-receive-pack, vole-admin, vole-roster, vole-whoami and vole-runner are available") | ||
| 270 | refuse("only git-upload-pack, git-receive-pack, vole-admin, vole-roster, vole-whoami, vole-runner and vole-change-merge are available") | ||
| 263 | 271 | return | |
| 264 | 272 | } | |
| 265 | 273 | verb := argv[0] | |