File tree 1 file changed +9
-1
lines changed 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -653,7 +653,15 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
653
653
if pb != nil && pb .EnableStatusCheck {
654
654
ctx .Data ["is_context_required" ] = func (context string ) bool {
655
655
for _ , c := range pb .StatusCheckContexts {
656
- if gp , err := glob .Compile (c ); err == nil && gp .Match (context ) {
656
+ if c == context {
657
+ return true
658
+ }
659
+ if gp , err := glob .Compile (c ); err != nil {
660
+ // All newly created status_check_contexts are checked to ensure they are valid glob expressions before being stored in the database.
661
+ // But some old status_check_context created before glob was introduced may be invalid glob expressions.
662
+ // So log the error here for debugging.
663
+ log .Error ("compile glob %q: %v" , c , err )
664
+ } else if gp .Match (context ) {
657
665
return true
658
666
}
659
667
}
You can’t perform that action at this time.
0 commit comments