@@ -30,14 +30,22 @@ func TestFunc(t *testing.T) {
30
30
match : true ,
31
31
matcher : Func ([]string {"spaceghost/*" , "octocat/*" }, []string {"push" }, true ),
32
32
},
33
- // repoisitory matching
33
+ // repository matching
34
34
{
35
35
repo : "octocat/hello-world" ,
36
36
event : "pull_request" ,
37
37
trusted : false ,
38
38
match : true ,
39
39
matcher : Func ([]string {"spaceghost/*" , "octocat/*" }, []string {}, false ),
40
40
},
41
+ // repository matching, skipping an org
42
+ {
43
+ repo : "octocat/hello-world" ,
44
+ event : "pull_request" ,
45
+ trusted : false ,
46
+ match : true ,
47
+ matcher : Func ([]string {"!spaceghost/*" , "octocat/*" }, []string {}, false ),
48
+ },
41
49
// event matching
42
50
{
43
51
repo : "octocat/hello-world" ,
@@ -67,6 +75,22 @@ func TestFunc(t *testing.T) {
67
75
match : false ,
68
76
matcher : Func ([]string {"octocat/*" }, []string {}, false ),
69
77
},
78
+ // repository matching, skip all repos in the org
79
+ {
80
+ repo : "spaceghost/hello-world" ,
81
+ event : "pull_request" ,
82
+ trusted : false ,
83
+ match : false ,
84
+ matcher : Func ([]string {"!spaceghost/*" }, []string {}, false ),
85
+ },
86
+ // repository matching, skip a concrete repo
87
+ {
88
+ repo : "spaceghost/hello-world" ,
89
+ event : "pull_request" ,
90
+ trusted : false ,
91
+ match : false ,
92
+ matcher : Func ([]string {"!spaceghost/hello-world" }, []string {}, false ),
93
+ },
70
94
// event matching
71
95
{
72
96
repo : "octocat/hello-world" ,
0 commit comments