Current_githubIntegration with GitHub.
val webhook :
engine:Current.Engine.t ->
get_job_ids:(owner:string -> name:string -> hash:string -> string list) ->
webhook_secret:string ->
Current_web.Resource.tGitHub webhook endpoint. This MUST be added to Current_web.routes so that we get notified of events. This webhook handles the events:
Webhook payloads are validated against webhook_secret.
See https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks
Note that the endpoint is supplied with a callback `get_job_ids.` This is used to determine what job_ids correspond to a commit. The checks API specifies the repository and the commit (that the action is being requested against) - this callback is used to determine what jobs to apply the action to.
Permissions are managed by the checks API so that re-runs can only be requested by anyone with write permission to a repository.
module Repo_id : sig ... endIdentifier for a repository hosted on GitHub.
module Api : sig ... endAccess to the GitHub API.
module Installation : sig ... endInstallation of a GitHub application.
module App : sig ... endA GitHub Application.
module Auth : sig ... endUse GitHub to authenticate users.