From f6f01418f13c7a46d450bbe6eb2d5d834a2d5fa7 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Sat, 6 Feb 2021 11:20:26 +0000 Subject: [PATCH] Disable feature for maintainers Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- handler/template_handler.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/handler/template_handler.go b/handler/template_handler.go index 73add8e..e27f005 100644 --- a/handler/template_handler.go +++ b/handler/template_handler.go @@ -11,6 +11,17 @@ import ( func CheckIssueTemplateHeadings(req types.IssuesOuter, derekConfig *types.DerekRepoConfig, config config.Config) error { + maintainer := false + for _, u := range derekConfig.Maintainers { + if u == req.Sender.Login { + maintainer = true + break + } + } + if maintainer { + return nil + } + body := req.Issue.Body found := 0