From cf9c39eba7d9bfdcc5eee2f6675c3480f84e0244 Mon Sep 17 00:00:00 2001 From: whywaita Date: Wed, 6 Nov 2024 17:33:55 +0900 Subject: [PATCH] Accept dependabot in GHES --- pkg/web/webhook.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/web/webhook.go b/pkg/web/webhook.go index eb36e7d..1bff179 100644 --- a/pkg/web/webhook.go +++ b/pkg/web/webhook.go @@ -101,7 +101,7 @@ func receiveCheckRunWebhook(ctx context.Context, event *github.CheckRunEvent, ds repoURL := repo.GetHTMLURL() if action != "created" { - logger.Logf(true, "check_action is not created, ignore") + logger.Logf(true, "check_action is not created, ignore (%s)", action) return nil } @@ -203,6 +203,11 @@ func receiveWorkflowJobWebhook(ctx context.Context, event *github.WorkflowJobEve } func isRequestedMyshoesLabel(labels []string) bool { + // Accept dependabot runner in GHES + if len(labels) == 1 && strings.EqualFold(labels[0], "dependabot") { + return true + } + for _, label := range labels { if strings.EqualFold(label, "myshoes") || strings.EqualFold(label, "self-hosted") { return true