@@ -30,14 +30,22 @@ func TestFunc(t *testing.T) {
3030 match : true ,
3131 matcher : Func ([]string {"spaceghost/*" , "octocat/*" }, []string {"push" }, true ),
3232 },
33- // repoisitory matching
33+ // repository matching
3434 {
3535 repo : "octocat/hello-world" ,
3636 event : "pull_request" ,
3737 trusted : false ,
3838 match : true ,
3939 matcher : Func ([]string {"spaceghost/*" , "octocat/*" }, []string {}, false ),
4040 },
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+ },
4149 // event matching
4250 {
4351 repo : "octocat/hello-world" ,
@@ -67,6 +75,22 @@ func TestFunc(t *testing.T) {
6775 match : false ,
6876 matcher : Func ([]string {"octocat/*" }, []string {}, false ),
6977 },
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+ },
7094 // event matching
7195 {
7296 repo : "octocat/hello-world" ,
0 commit comments