handle GET requests in webhook hra (#378)

This commit is contained in:
Rob Whitby
2021-03-08 23:46:27 +00:00
committed by GitHub
parent 8c0f3dfc79
commit 1753fa3530
2 changed files with 19 additions and 0 deletions

View File

@@ -95,6 +95,12 @@ func (autoscaler *HorizontalRunnerAutoscalerGitHubWebhook) Handle(w http.Respons
}
}()
// respond ok to GET / e.g. for health check
if r.Method == http.MethodGet {
fmt.Fprintln(w, "webhook server is running")
return
}
var payload []byte
if len(autoscaler.SecretKeyBytes) > 0 {