Liking cljdoc? Tell your friends :D

clj-github.state-flow-helper


mock-github-flowcljmacro

(mock-github-flow seed-data-expr & flows)

Runs a sequence of flows mocking calls to github api. Behavior of the mock can be setup via the following attributes:

  • :initial-state: a map containing information about organizations and repositories that will form the initial state of the emulator.

Example:

{:orgs [{:name "nubank" :repos [{:name "some-repo" :default_branch "master"}]}]}

default_branch is optional and will default to "main".

  • :responses: allow mocking specific calls that are not supported out of the box. Responses are a vector of request and response pairs.

Example:

["/repos/nubank/some-repo/pulls/1" {:status 200 :body {:id 1}}]

This is backed up by http-kit-fake, for more details on how to declare requests and responses see https://github.com/d11wtq/http-kit-fake.

Runs a sequence of flows mocking calls to github api. Behavior of the mock
can be setup via the following attributes:

- `:initial-state`: a map containing information about organizations
and repositories that will form the initial state of the emulator.

Example:
```
{:orgs [{:name "nubank" :repos [{:name "some-repo" :default_branch "master"}]}]}
```

`default_branch` is optional and will default to "main".

- `:responses`: allow mocking specific calls that are not supported out of the box.
Responses are a vector of request and response pairs.

Example:

```
["/repos/nubank/some-repo/pulls/1" {:status 200 :body {:id 1}}]
```

This is backed up by `http-kit-fake`, for more details on how to declare requests and responses
see https://github.com/d11wtq/http-kit-fake.
sourceraw docstring

with-github-clientclj

(with-github-client github-client-fn)

State monad that returns the result of executing github-client-fn with github-client as argument

State monad that returns the result of executing github-client-fn with github-client as argument
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close