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.

Tighten up the issue and change review pages

564acd4b6de233740f3c19e297c4655e8952d40c · Keenan Nemetz · 15d ago · parent a464f892

Tighten up the issue and change review pages

- Move contributor-branch CI approval from the Runs tab to the change
  request header, and return the allow form to that request.
- Put issue and change actions in the page header, right aligned with the
  title, instead of duplicating them in the sidebar.
- Drop sidebar details that repeated the header: state, author, age and
  reference. Keep labels, assignees, review base/head, approvals and checks.
- Consolidate approval status into one section and remove the empty-state
  line now covered by the count.
- Fix diff row spacing: keep pre-wrap on the code column only, so template
  whitespace in the gutter cells no longer creates blank lines.

Update the contributor CI test, the HTMX fragment expectations and the
documentation that named the Runs tab as the approval location.

server/web/writes.go +1−25

@@ -464,7 +464,7 @@ func (w *Web) ChangeIssueState(rw http.ResponseWriter, r *http.Request) {
464 464 http.Error(rw, "you do not have permission to change this issue", http.StatusForbidden)
465 465 return
466 466 }
467 updated, err := metadata.UpdateIssue(m.Git(), id, func(iss *metadata.Issue) error {
467 _, err = metadata.UpdateIssue(m.Git(), id, func(iss *metadata.Issue) error {
468 468 if iss.State == state {
469 469 return metadata.ErrNoChange
470 470 }
@@ -472,10 +472,6 @@ func (w *Web) ChangeIssueState(rw http.ResponseWriter, r *http.Request) {
472 472 return nil
473 473 }, pr.account.Name)
474 474 if err != nil && !errors.Is(err, metadata.ErrNoChange) {
475 if htmxRequest(r) {
476 w.render(rw, "issue_state", w.issueSidebar(r, m, iss, "", err.Error()), 0)
477 return
478 }
479 475 http.Error(rw, "cannot change the issue: "+err.Error(), http.StatusInternalServerError)
480 476 return
481 477 }
@@ -483,13 +479,6 @@ func (w *Web) ChangeIssueState(rw http.ResponseWriter, r *http.Request) {
483 479 if problems := metadata.ValidateIssues(m.Git(), metadata.Ref); len(problems) > 0 {
484 480 w.Logger("web: issue state %s left the metadata tree invalid: %v", id, problems)
485 481 }
486 if htmxRequest(r) {
487 if updated == nil {
488 updated = iss
489 }
490 w.render(rw, "issue_state", w.issueSidebar(r, m, updated, "", ""), 0)
491 return
492 }
493 482 http.Redirect(rw, r, "/r/"+m.Name+"/issues/"+id, http.StatusSeeOther)
494 483 }
495 484
@@ -626,10 +615,6 @@ func (w *Web) ChangeRequestState(rw http.ResponseWriter, r *http.Request) {
626 615 return
627 616 }
628 617 if _, err := metadata.SetRequestState(m.Git(), id, state, pr.account.Name); err != nil {
629 if htmxRequest(r) {
630 w.render(rw, "request_sidebar", w.requestSidebar(r, m, req, "", err.Error()), 0)
631 return
632 }
633 618 http.Error(rw, "cannot change the change request: "+err.Error(), http.StatusInternalServerError)
634 619 return
635 620 }
@@ -637,14 +622,5 @@ func (w *Web) ChangeRequestState(rw http.ResponseWriter, r *http.Request) {
637 622 if problems := metadata.ValidateRequests(m.Git(), metadata.Ref); len(problems) > 0 {
638 623 w.Logger("web: request state %s left the request tree invalid: %v", id, problems)
639 624 }
640 if htmxRequest(r) {
641 updated, err := metadata.GetRequest(m.Git(), id)
642 if err != nil {
643 w.render(rw, "request_sidebar", w.requestSidebar(r, m, req, "", err.Error()), 0)
644 return
645 }
646 w.render(rw, "request_sidebar", w.requestSidebar(r, m, updated, "", ""), 0)
647 return
648 }
649 625 http.Redirect(rw, r, "/r/"+m.Name+"/requests/"+id, http.StatusSeeOther)
650 626 }