feat: Organization RunnerDeployment with webhook-based autoscaling only for certain repositories (#766)

Resolves #765

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
Tarasovych
2021-08-31 03:46:36 +03:00
committed by GitHub
parent d9df455781
commit 7008b0c257
9 changed files with 76 additions and 7 deletions

View File

@@ -38,6 +38,16 @@ func (autoscaler *HorizontalRunnerAutoscalerGitHubWebhook) MatchCheckRunEvent(ev
return false
}
if len(scaleUpTrigger.GitHubEvent.CheckRun.Repositories) > 0 {
for _, repository := range scaleUpTrigger.GitHubEvent.CheckRun.Repositories {
if repository == *event.Repo.Name {
return true
}
}
return false
}
return true
}
}