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/admin_access.go +9−5
| @@ -34,6 +34,7 @@ type accessView struct { | |||
| 34 | 34 | Default string | |
| 35 | 35 | Approvals int | |
| 36 | 36 | Checks bool | |
| 37 | LinkedIssue bool | ||
| 37 | 38 | Protected string | |
| 38 | 39 | Rows []aclRow | |
| 39 | 40 | AddAccounts []string | |
| @@ -47,11 +48,12 @@ func (w *Web) accessView(r *http.Request, ctx *settingsContext) *accessView { | |||
| 47 | 48 | return nil | |
| 48 | 49 | } | |
| 49 | 50 | v := &accessView{ | |
| 50 | Default: ctx.acl.Default, | ||
| 51 | Approvals: ctx.acl.RequiredApprovals(), | ||
| 52 | Checks: ctx.acl.RequiresChecks(), | ||
| 53 | Protected: strings.Join(ctx.acl.Protected, "\n"), | ||
| 54 | Rows: w.aclRows(ctx.acl), | ||
| 51 | Default: ctx.acl.Default, | ||
| 52 | Approvals: ctx.acl.RequiredApprovals(), | ||
| 53 | Checks: ctx.acl.RequiresChecks(), | ||
| 54 | LinkedIssue: ctx.acl.RequiresLinkedIssue(), | ||
| 55 | Protected: strings.Join(ctx.acl.Protected, "\n"), | ||
| 56 | Rows: w.aclRows(ctx.acl), | ||
| 55 | 57 | } | |
| 56 | 58 | v.AddAccounts = w.addableAccounts(v.Rows) | |
| 57 | 59 | switch r.URL.Query().Get("saved") { | |
| @@ -90,6 +92,7 @@ func (w *Web) SaveRepositoryAccess(rw http.ResponseWriter, r *http.Request) { | |||
| 90 | 92 | return | |
| 91 | 93 | } | |
| 92 | 94 | checks := r.PostFormValue("checks") != "" | |
| 95 | linkedIssue := r.PostFormValue("require_linked_issue") != "" | ||
| 93 | 96 | protected := splitLines(r.PostFormValue("protected")) | |
| 94 | 97 | ||
| 95 | 98 | // The rows this page rendered, and what the form said about each one. Anything | |
| @@ -121,6 +124,7 @@ func (w *Web) SaveRepositoryAccess(rw http.ResponseWriter, r *http.Request) { | |||
| 121 | 124 | cur.Default = defaultRole.String() | |
| 122 | 125 | cur.ApprovalsRequired = &approvals | |
| 123 | 126 | cur.ChecksRequired = &checks | |
| 127 | cur.RequireLinkedIssue = linkedIssue | ||
| 124 | 128 | cur.Protected = protected | |
| 125 | 129 | for _, rc := range roles { | |
| 126 | 130 | if rc.role == access.None { | |