File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 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
653653 if pb != nil && pb .EnableStatusCheck {
654654 ctx .Data ["is_context_required" ] = func (context string ) bool {
655655 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 ) {
657665 return true
658666 }
659667 }
You can’t perform that action at this time.
0 commit comments