summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r--routers/web/repo/pull.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index 070fc109dc..8821e74c95 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -45,6 +45,8 @@ import (
"code.gitea.io/gitea/services/gitdiff"
pull_service "code.gitea.io/gitea/services/pull"
repo_service "code.gitea.io/gitea/services/repository"
+
+ "github.com/gobwas/glob"
)
const (
@@ -575,7 +577,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
if pb != nil && pb.EnableStatusCheck {
ctx.Data["is_context_required"] = func(context string) bool {
for _, c := range pb.StatusCheckContexts {
- if c == context {
+ if gp, err := glob.Compile(c); err == nil && gp.Match(context) {
return true
}
}