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 @@ -637,7 +637,15 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
637
637
if pb != nil && pb .EnableStatusCheck {
638
638
ctx .Data ["is_context_required" ] = func (context string ) bool {
639
639
for _ , c := range pb .StatusCheckContexts {
640
- if gp , err := glob .Compile (c ); err == nil && gp .Match (context ) {
640
+ if c == context {
641
+ return true
642
+ }
643
+ if gp , err := glob .Compile (c ); err != nil {
644
+ // All newly created status_check_contexts are checked to ensure they are valid glob expressions before being stored in the database.
645
+ // But some old status_check_context created before glob was introduced may be invalid glob expressions.
646
+ // So log the error here for debugging.
647
+ log .Error ("compile glob %q: %v" , c , err )
648
+ } else if gp .Match (context ) {
641
649
return true
642
650
}
643
651
}
You can’t perform that action at this time.
0 commit comments