Configuring Environments
Learn how to configure different aspects of your Flipt environments
Commit Messages, Pull-Request Titles and Bodies
Flipt Cloud dynamically generates commit messages and pull-requests based on parameters of the changes being made. It passes these parameters through Go templates to produce the resulting messages. While cloud is configured with some sensible defaults, these can be overridden on a per Flipt environment basis.
To override these templates you must provide a flipt.yaml
file at the root of your environment tree.
An environment is a combination of a Git repository
, a branch
name and
directory
path. These are selected when you create your environment in Flipt
Cloud.
The flipt.yaml
file must exist in this directory and branch in order
to configure the relevant environment.
When this file isn’t provided, a default one is implicitly generated. The default is effectively the following:
Commit Message
Commit message templates are supplied with a list of changes.
Currently, Flipt only provides a single change, however, this may change in the future. As such, the template provides a list of changes.
A change is a combination of a verb
and resource
.
A resource is a combination of type
, namespace
(when relevant) and key
.
The following is a pseudo-schema for the context passed to this template:
Simply printing out a change in the template (for example,{{ (index .Changes 0) }}
) results in the following format:
Proposal (Pull-Request) Title and Body
Proposals (generated Pull-Requests) have a configurable title and body templates.
Both templates are provided with the base
environment and the branch
environment configuration.
The following is a pseudo-schema for the context passed to these templates:
Was this page helpful?