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.
Show both target commit ids in the review labels
6db4cdbd38e9f87e3f89c437cf2061c1fe5d3150 · Keenan Nemetz · 11d ago · parent b74cb029
Show both target commit ids in the review labels The Head branch label names the commit under review, and Base branch names the current tip of the base. The base id is derived because the request stores only the branch name and the approval binds to that name plus the head.
server/web/request_view.go +10
| @@ -113,6 +113,11 @@ type requestSidebarView struct { | |||
| 113 | 113 | // is narrowed to the viewer's own namespace for a contributor. | |
| 114 | 114 | BaseOptions []branchOption | |
| 115 | 115 | HeadOptions []branchOption | |
| 116 | // BaseSHA is the current tip of the base branch, derived rather than stored. | ||
| 117 | // The request names a branch and an approval binds to that branch name plus the | ||
| 118 | // head commit, so the base can move without making an approval stale. The picker | ||
| 119 | // shows it as the current tip; it is not part of the record. | ||
| 120 | BaseSHA string | ||
| 116 | 121 | // CanMerge is the merge control: true only when the gate would accept the | |
| 117 | 122 | // landing now, so the button never offers something the handler would refuse. | |
| 118 | 123 | CanMerge bool | |
| @@ -204,10 +209,14 @@ func (w *Web) requestSidebar(r *http.Request, m *repo.Meta, req *metadata.Reques | |||
| 204 | 209 | approvable := req.Open() && canApproveRequest(acl, who, req.Author) && headRefNote != "branch moved" | |
| 205 | 210 | canRetarget := req.Open() && canTriage(acl, who, req.Author) | |
| 206 | 211 | var baseOptions, headOptions []branchOption | |
| 212 | var baseSHA string | ||
| 207 | 213 | if canRetarget { | |
| 208 | 214 | branches := branchNames(m) | |
| 209 | 215 | baseOptions = branchOptions(branches, req.Base) | |
| 210 | 216 | headOptions = branchOptions(headBranches(branches, acl, who), req.HeadRef) | |
| 217 | if tip, err := m.Git().RevParse("refs/heads/" + req.Base); err == nil { | ||
| 218 | baseSHA = tip | ||
| 219 | } | ||
| 211 | 220 | } | |
| 212 | 221 | // Preflight the landing rather than guessing from the approval count: the same | |
| 213 | 222 | // gate the handler calls is asked here, so the button and the write agree about | |
| @@ -244,6 +253,7 @@ func (w *Web) requestSidebar(r *http.Request, m *repo.Meta, req *metadata.Reques | |||
| 244 | 253 | Approvals: approvals, Checks: checks, Required: required, Current: current, | |
| 245 | 254 | CanApprove: approvable, CanClose: canClose, HeadRefNote: headRefNote, | |
| 246 | 255 | CanRetarget: canRetarget, BaseOptions: baseOptions, HeadOptions: headOptions, | |
| 256 | BaseSHA: baseSHA, | ||
| 247 | 257 | CanMerge: mergeable, MergeBlocked: mergeBlocked, | |
| 248 | 258 | CanDiscuss: w.canDiscuss(r, acl), | |
| 249 | 259 | ContributorCI: contributorCI, | |