Functionality specific for Github
Functionality specific for Github
(create-app-build rt {:keys [customer-id id]} payload)
Creates a build as triggered from an app call. This does not originate from a webhook, but rather from a watched repo.
Creates a build as triggered from an app call. This does not originate from a webhook, but rather from a watched repo.
(create-build {st :storage :as rt}
{:keys [customer-id repo-id] :as init-build}
payload)
Looks up details for the given github webhook. If the webhook refers to a valid configuration, a build entity is created and a build structure is returned, which eventually will be passed on to the runner.
Looks up details for the given github webhook. If the webhook refers to a valid configuration, a build entity is created and a build structure is returned, which eventually will be passed on to the runner.
(get-config req)
Lists public github configuration to use
Lists public github configuration to use
Checks if the incoming request is actually a push. Github can also send other types of requests.
Checks if the incoming request is actually a push. Github can also send other types of requests.
(request-user-info token)
Fetch github user details in order to get the id and email (although the latter is not strictly necessary). We need the id in order to link the Github user to the MonkeyCI user.
Fetch github user details in order to get the id and email (although the latter is not strictly necessary). We need the id in order to link the Github user to the MonkeyCI user.
(valid-security? {:keys [secret payload x-hub-signature]})
Validates security header
Validates security header
(validate-security h)
(validate-security h get-secret)
Middleware that validates the github security header using a fn that retrieves the secret for the request.
Middleware that validates the github security header using a fn that retrieves the secret for the request.
(watch-repo req)
Adds the repository to the watch list for github webhooks. If the repo does not exist, it will be created.
Adds the repository to the watch list for github webhooks. If the repo does not exist, it will be created.
(webhook {p :parameters :as req})
Receives an incoming webhook from Github. This starts the build runner async and returns a 202 accepted.
Receives an incoming webhook from Github. This starts the build runner async and returns a 202 accepted.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close