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/vole.git

Write over SSH with a registered key:

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

A free and open-source forge that lives in your Git repo.

Filter workflow events by mentions and assignment

727df38613897e6ffd56e1df05a2f674174bf547 · Keenan Nemetz · 8d ago · parent eb07ff56

Filter workflow events by mentions and assignment

Add mentioned, replied-to, assigned-to, and author filters to issue, comment, and change-request triggers. Move the role vocabulary into core/role so author.role is validated without importing the access store, and pin mentions, reply authors, and assignee changes in the event payload.

core/role/role_test.go +31

@@ -0,0 +1,31 @@
1 package role
2
3 import "testing"
4
5 func TestParseAndOrder(t *testing.T) {
6 t.Parallel()
7 for in, want := range map[string]Role{
8 "": None,
9 "none": None,
10 "read": Read,
11 "contrib": Contribute,
12 "contributor": Contribute,
13 "contribute": Contribute,
14 "write": Maintain,
15 "maintainer": Maintain,
16 "maintain": Maintain,
17 "owner": Admin,
18 "admin": Admin,
19 } {
20 got, err := Parse(in)
21 if err != nil || got != want {
22 t.Errorf("Parse(%q) = %v, %v; want %v", in, got, err, want)
23 }
24 }
25 if _, err := Parse("wizard"); err == nil {
26 t.Fatal("Parse accepted an unknown role")
27 }
28 if !Admin.AtLeast(Maintain) || Contribute.AtLeast(Maintain) || !Maintain.AtLeast(Maintain) {
29 t.Fatal("role ordering is not minimum-role ordering")
30 }
31 }