Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Require a linked issue when a change request opens

0789f22ea633bf995417893c0052abb6a36d5520 · Keenan Nemetz · 9d ago · parent 1265ea55

Require a linked issue when a change request opens

Add a per-repository policy for teams that want every proposed update to trace back to an issue. The browser marks Closes as required, and the pre-receive hook applies the same rule to requests added through the CLI or a hand-written metadata commit. Existing requests stay editable and landable.

server/web/writes.go +4

@@ -285,6 +285,10 @@ func (w *Web) CreateChangeRequest(rw http.ResponseWriter, r *http.Request) {
285 285 http.Error(rw, err.Error(), http.StatusBadRequest)
286 286 return
287 287 }
288 if ctx.ACL.RequiresLinkedIssue() && len(req.Closes) == 0 {
289 http.Error(rw, "This repository requires at least one linked issue when a change is opened. Add an issue in Closes.", http.StatusBadRequest)
290 return
291 }
288 292 if err := metadata.CreateRequest(m.Git(), req, ctx.Name); err != nil {
289 293 w.serverError(rw, r, "cannot open the change: "+err.Error())
290 294 return