feat: Organization RunnerDeployment with webhook-based autoscaling only for certain repositories (#766)
Lint and Test Charts / lint-test (push) Has been cancelled

Resolves #765

Co-authored-by: Yusuke Kuoka <[email protected]>
This commit is contained in:
Tarasovych
2021-08-31 09:46:36 +09:00
committed by GitHub
co-authored by Yusuke Kuoka
parent d9df455781
commit 7008b0c257
9 changed files with 76 additions and 7 deletions
@@ -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
}
}