Configuring Stoat
The Stoat config file is located at .stoat/config.yaml
file in a Git repository.
We recommend following our getting started guide to use the CLI to create this file.
We publish the full JSON schema for this config file on our GitHub repo.
This YAML file has a few sections:
-
version
(required) - The version is used to show the compatibility of the config file with the Stoat server version. While most changes will be backwards-compatible, you may need to upgrade the version in the future to support some new features. -
enabled
(optional) - The enabled flag defaults totrue
. The purpose of this flag is to allow you to easily disable Stoat repo-wide. -
comment_template_file
(optional) - When not specified, this uses a remote version of a standard template. We will regularly update the contents of this remote version to include improvements for our core set of plugins. You can view a description of the current default remote v1 template via our API. -
plugins
(optional) - This is a mapping of a plugin to the configuration for a plugin. Stoat has static hosting, job runtime, and raw json plugins. Some plugins like job runtime are configured for the entire repo, while other plugins like static hosting and raw json are configured for specific tasks, or plugin instances. Each task has a user-defined task id, which is used to reference the outputs in the comment template. Each task can also specify ametadata
key. Our default templates forstatic_hosting
use the value for aname
withinmetadata
to label links. However, for your own templating convenience, you can store any data with any structure withinmetadata
.Here are examples of tasks for each of the plugin types:
static_hostingplugins:
static_hosting:
docs:
metadata:
name: Documentation
path: build/static-docsjsonplugins:
json:
docs:
path: build/build_metadata.jsonjob_runtimeplugins:
job_runtime:
enabled: true
Debugging
If you're wondering what config file was used to generate a specific comment, click the "debug" button at the bottom of the Stoat comment. The contents of the Stoat config file will be available, rendered in JSON.