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.

Rename Change requests to Changes in the web UI

b06184d1105ff5ea27a5b8dd0a827f0bf870ce7a · Keenan Nemetz · 11d ago · parent 55615c7a

Rename Change requests to Changes in the web UI

Use one word for a proposed branch update: the repository tab, page
heading, list, empty states, overview, home page, activity feed, and
error messages now say Changes. Add the missing subtitle to the changes
list page.

server/web/writes.go +11−11

@@ -185,11 +185,11 @@ func (w *Web) ApproveRequest(rw http.ResponseWriter, r *http.Request) {
185 185 return
186 186 }
187 187 if !req.Open() {
188 http.Error(rw, "this change request is not open", http.StatusBadRequest)
188 http.Error(rw, "this change is not open", http.StatusBadRequest)
189 189 return
190 190 }
191 191 if req.Author == ctx.Name {
192 http.Error(rw, "you cannot approve your own change request", http.StatusForbidden)
192 http.Error(rw, "you cannot approve your own change", http.StatusForbidden)
193 193 return
194 194 }
195 195 sidebar := func(msg string) (string, any) {
@@ -236,7 +236,7 @@ func (w *Web) CreateChangeRequest(rw http.ResponseWriter, r *http.Request) {
236 236 }
237 237 m := ctx.Repo
238 238 if !ctx.canOpenChangeRequest() {
239 w.refuse(rw, r, "you do not have permission to open change requests here")
239 w.refuse(rw, r, "you do not have permission to open changes here")
240 240 return
241 241 }
242 242 title := strings.TrimSpace(r.PostFormValue("title"))
@@ -245,7 +245,7 @@ func (w *Web) CreateChangeRequest(rw http.ResponseWriter, r *http.Request) {
245 245 head := strings.TrimPrefix(strings.TrimSpace(r.PostFormValue("head")), "refs/heads/")
246 246 metadataBranch := strings.TrimPrefix(metadata.Ref, "refs/heads/")
247 247 if title == "" {
248 http.Error(rw, "a change request needs a title", http.StatusBadRequest)
248 http.Error(rw, "a change needs a title", http.StatusBadRequest)
249 249 return
250 250 }
251 251 if base == "" || base == metadataBranch || head == "" || head == metadataBranch {
@@ -292,7 +292,7 @@ func (w *Web) CreateChangeRequest(rw http.ResponseWriter, r *http.Request) {
292 292 return
293 293 }
294 294 if err := metadata.CreateRequest(m.Git(), req, ctx.Name); err != nil {
295 w.serverError(rw, r, "cannot open the change request: "+err.Error())
295 w.serverError(rw, r, "cannot open the change: "+err.Error())
296 296 return
297 297 }
298 298 w.audit("web.request.create", ctx.Name, m.Name, req.ID+" "+headCommit)
@@ -354,7 +354,7 @@ func (w *Web) ChangeRequestState(rw http.ResponseWriter, r *http.Request) {
354 354 return
355 355 }
356 356 if !ctx.canTriage(req.Author) {
357 w.refuse(rw, r, "you do not have permission to change this change request")
357 w.refuse(rw, r, "you do not have permission to change this change")
358 358 return
359 359 }
360 360 state := strings.TrimSpace(r.PostFormValue("state"))
@@ -363,7 +363,7 @@ func (w *Web) ChangeRequestState(rw http.ResponseWriter, r *http.Request) {
363 363 return
364 364 }
365 365 if _, err := metadata.SetRequestState(m.Git(), id, state, ctx.Name); err != nil {
366 w.serverError(rw, r, "cannot change the change request: "+err.Error())
366 w.serverError(rw, r, "cannot change the change: "+err.Error())
367 367 return
368 368 }
369 369 w.audit("web.request.state", ctx.Name, m.Name, id+" "+state)
@@ -394,11 +394,11 @@ func (w *Web) UpdateRequestTarget(rw http.ResponseWriter, r *http.Request) {
394 394 return
395 395 }
396 396 if !ctx.canTriage(req.Author) {
397 w.refuse(rw, r, "you do not have permission to change this change request's target")
397 w.refuse(rw, r, "you do not have permission to change this change's target")
398 398 return
399 399 }
400 400 if !req.Open() {
401 w.refuse(rw, r, "only an open change request can change its target")
401 w.refuse(rw, r, "only an open change can change its target")
402 402 return
403 403 }
404 404
@@ -447,7 +447,7 @@ func (w *Web) UpdateRequestTarget(rw http.ResponseWriter, r *http.Request) {
447 447
448 448 if base != req.Base || headTip != req.Head || headRef != req.HeadRef {
449 449 if _, err := metadata.SetRequestTarget(m.Git(), id, base, headTip, headRef, ctx.Name); err != nil {
450 w.serverError(rw, r, "cannot update the change request's target: "+err.Error())
450 w.serverError(rw, r, "cannot update the change's target: "+err.Error())
451 451 return
452 452 }
453 453 w.audit("web.request.target", ctx.Name, m.Name,
@@ -493,7 +493,7 @@ func (w *Web) MergeRequest(rw http.ResponseWriter, r *http.Request) {
493 493 return
494 494 }
495 495 if !req.Open() {
496 http.Error(rw, "this change request is not open", http.StatusBadRequest)
496 http.Error(rw, "this change is not open", http.StatusBadRequest)
497 497 return
498 498 }
499 499 _, err = landing.Land(w.landGate(m, ctx.ACL, ctx.Name), id, ctx.Name, time.Now().UTC())