blocked v0.10.0 Blocked.Config View Source

Configuration for Blocked.

The simplest ways to configure Blocked is by:

  • adding config :blocked. [warn: true, project_owner: "YourName"] to your Elixir configuration file. (for older Elixir versions, this is Mix.Config; for newer versions, Config.)
  • alternatively, adding system-environment-variables like BLOCKED_WARN=true, BLOCKED_PROJECT_OWNER="YourName" etc. to the environment you want to run Blocked in.

If you want to check the configuration in the current environment, print the output of Blocked.Config.load_with_defaults.

More advanced configuration set-ups are possible by using the advanced features of Specify.

Configuration structure documentation:

This configuration was made using the Specify library. It contains the following fields:

warn

trigger warnings in this particular environment.

When this is off, Blocked.by will simply silently compile to whatever block was passed.

It is automatically turned on (by default) when we're in a Continuous Integration environment. (this is checked by looking for the prescence of the CI environment variable.)

Validated/parsed by calling Specify.Parsers.term/1.

(Specified as :term)

Defaults to nil.

project_repo

The repository name of this source-code project.

This can be overridden if you cannot or don't want to rely on Blocked's auto-detection using the git command-line tools.

Validated/parsed by calling Specify.Parsers.term/1.

(Specified as :term)

Defaults to nil.

project_owner

The name of the owner or organization of this source-code project.

This can be overridden if you cannot or don't want to rely on Blocked's auto-detection using the git command-line tools.

Validated/parsed by calling Specify.Parsers.term/1.

(Specified as :term)

Defaults to nil.

github_api_token

This needs to be set if (and only if) you have a private GitHub-project, because otherwise we cannot access its issues.

The personal API token requires "repo" access.

c.f. https://github.blog/2013-05-16-personal-api-tokens/

Validated/parsed by calling Specify.Parsers.term/1.

(Specified as :term)

Defaults to nil.

Link to this section Summary

Functions

Loads, parses, and normalizes the configuration of Blocked.Config, based on the current source settings, returning the result as a struct.

Loads, parses and normalizes the configuration of Blocked.Config, using the provided explicit_values (and falling back to values configured elsewhere)

Link to this section Functions

Loads, parses, and normalizes the configuration of Blocked.Config, based on the current source settings, returning the result as a struct.

For more information about the options this function supports, see Specify.load/2 and Specify.Options

Link to this function

load_explicit(explicit_values, options \\ [])

View Source

Loads, parses and normalizes the configuration of Blocked.Config, using the provided explicit_values (and falling back to values configured elsewhere)

For more information about the options this function supports, see Specify.load_explicit/3 and Specify.Options