feat: adding workflow_dispatch webhook event

This commit is contained in:
Callum
2021-10-09 10:07:07 +01:00
parent 8657a34f32
commit d36d47fe66
4 changed files with 67 additions and 3 deletions
@@ -183,6 +183,15 @@ func (autoscaler *HorizontalRunnerAutoscalerGitHubWebhook) Handle(w http.Respons
"action", e.GetAction(),
)
}
case *gogithub.WorkflowDispatchEvent:
target, err = autoscaler.getScaleUpTarget(
context.TODO(),
log,
e.Repo.GetName(),
e.Repo.Owner.GetLogin(),
e.Repo.Owner.GetType(),
autoscaler.WorkflowDispatchEvent(e),
)
case *gogithub.WorkflowJobEvent:
if workflowJob := e.GetWorkflowJob(); workflowJob != nil {
log = log.WithValues(