Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit 9daa8a4

Browse files
committed
don't accept hooks if the service is disabled
1 parent b823905 commit 9daa8a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/api/services/repohook/service.go

+4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ func (s BasicService) HandleGithubWebhook(rc *request.AnonymousContext, req *Git
6767
rc.Log.Warnf("Got no delivery guid in github webhook, generated it")
6868
}
6969

70+
if s.Cfg.GetBool("SERVICE_IS_DISABLED", false) {
71+
return nil
72+
}
73+
7074
var repo models.Repo
7175
err := models.NewRepoQuerySet(rc.DB).HookIDEq(req.HookID).One(&repo)
7276
if err != nil {

0 commit comments

Comments
 (0)