☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

template_string

Table of contents

Description:

This key defines the template string for the commit message.

The value is a string that specifies the commit message template. This template can include template variables and filters.

CloudCannon will only use this template string if template_path is not set for the commit template.

Appears in:
└── commit_templates
    └── [*]
        └── template_string
Type:
string
Examples:

In this example, we have configured a commit template with a template string that includes template variables.

Copied to clipboard
commit_templates:
  - label: Default
    template_string: '{commit_type}: {message|trim}'
    _inputs:
      commit_type:
        type: select
        options:
          values:
            - feature
            - fix
{
  "commit_templates": [
    {
      "label": "Default",
      "template_string": "{commit_type}: {message|trim}",
      "_inputs": {
        "commit_type": {
          "type": "select",
          "options": {
            "values": [
              "feature",
              "fix"
            ]
          }
        }
      }
    }
  ]
}
Open in a new tab