Sign in

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

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Replace the runner allowlist with a runner role

648cd81bde97042f682a528ebb9ce6353b95bf3f · Keenan Nemetz · 1d ago · parent ea92d754

forge/access/store_test.go +5−4

@@ -37,7 +37,7 @@ func TestRulesRoundTripAndReplace(t *testing.T) {
37 37 t.Fatal(err)
38 38 }
39 39 a.Protected = []string{"refs/heads/main"}
40 a.SetRunners([]string{"01M5RUNNER000000000000000C"})
40 a.Entries["01M5RUNNER000000000000000C"] = "runner"
41 41 if err := s.Set("repo-1", a, "keenan", time.Now().UTC()); err != nil {
42 42 t.Fatal(err)
43 43 }
@@ -320,12 +320,13 @@ func TestConcurrentUpdatesAllLand(t *testing.T) {
320 320 func TestRetiredAccountsStopCounting(t *testing.T) {
321 321 t.Parallel()
322 322 s, _ := open(t)
323 s.Active = func(name string) bool { return name != "retired" }
323 s.Active = func(name string) bool { return name != "retired" && name != "retired-runner" }
324 324 if _, err := s.Update("repo-1", "keenan", func(a *ACL) error {
325 325 if err := a.SetEntry("retired", "maintain"); err != nil {
326 326 return err
327 327 }
328 a.SetRunners([]string{"retired", "active-runner"})
328 a.Entries["retired-runner"] = "runner"
329 a.Entries["active-runner"] = "runner"
329 330 return nil
330 331 }); err != nil {
331 332 t.Fatal(err)
@@ -340,7 +341,7 @@ func TestRetiredAccountsStopCounting(t *testing.T) {
340 341 if !got.EligibleApprover("keenan") && got.RoleFor("keenan") == Admin {
341 342 t.Fatal("an active admin stopped counting")
342 343 }
343 if got.CanReport("retired") {
344 if got.CanReport("retired-runner") {
344 345 t.Fatal("a retired runner still counts as a runner")
345 346 }
346 347 if !got.CanReport("active-runner") {