Skip to content

Bass CI

GitHub App

Bass CI

GitHub App

A GitHub App for forwarding GitHub webhook events to Bass scripts.

This app is experimental and the usage below will most likely change in the future.

Usage

  1. Create a script called bass/github-hook in the root of your repo.

  2. The event payload will be passed to the script on *stdin*.

    (defn main []
      (for [{:event event :payload payload} *stdin*]
        (log "handling event" :event event :payload (keys payload)))
  3. A special *loop* binding is set to a GitHub client module, used for running checks. Call it like so:

    (*loop*:start-check thunk "check-name" sha)

That's it! This app is a glorified GitHub webhook event dispatcher; it's up to your repository to decide how it wants to handle the events.

Running checks

For the common case of running checks, you can use the github.bass helper:

(use (.git (linux/alpine/git))
     (git:github/vito/bass-loop/ref/main/bass/github.bass))

; a set of validations to run against a checkout of the repo
(defn checks [src]
  {:tests (tests src)})

; called by bass-loop
(defn main []
  (for [event *stdin*]
    (github:check-hook event git:checkout checks)))

Developer

Bass CI is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

Report abuse