Skip to content

Commit

Permalink
Merge pull request #218 from whywaita/fix/dependabot-ghes
Browse files Browse the repository at this point in the history
Accept dependabot in GHES
  • Loading branch information
whywaita authored Nov 8, 2024
2 parents 180b31a + cf9c39e commit 00ab9f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/web/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 00ab9f3

Please sign in to comment.