Configuration File

The configuration file is still under development and is subject to changes

Name: .commitsar.yml

In order to make configuration easier than through flags we provide configuration file support. Most up to date examples can be found in https://github.com/aevea/commitsar/tree/master/config/testdata.

By default the current working directory is used to scan for the file. However this can be overriden by specifying COMMITSAR_CONFIG_PATH environment variable. Accepts relative or absolute paths.

Example: COMMITSAR_CONFIG_PATH=./testdata will scan for .commitsar.yaml in the testdata folder.

Global configuration

These are settings that get used across all runs of commitsar.

version: 1
verbose: false
NameDefault ValueDescriptionAvailable from
version1Currently not in use. Might be used in the future in case of incompatible upgrades.v0.14.0
verbosefalseTurns on debug logging of commitsar. Useful if you want to submit an issue.v0.14.0

Commit style settings

commits:
disabled: false
strict: true
limit: 0
all: false
NameDefault ValueDescriptionAvailable from
disabledfalseDisables checking commmits. Useful if you want to use commitsar only for PR titles.v0.14.0
stricttrueEnforces strict category enforcement.v0.14.0
limitnoneMakes commitsar check only the last x commits. Useful if you want to run commitsar on master.v0.14.0
allfalseMakes commitsar check all the commits in history. Overrides the limit flagv0.14.0

Pull Request style settings

Pull Request pipeline is still in early stages. Please report any bugs

pull_request:
jira_title: true
jira_keys:
- TEST
- TSLA

Setting jira_title to true will enable the pipeline. By default commitsar will use a basic regex to check for any JIRA-like references. Further scoping can be done using the jira_keys setting.

NameDefault ValueDescriptionAvailable from
jira_titlefalseTurns on the pipeline and will check for JIRA issues in the PR title.v0.15.0
jira_keysnoneArray of string project keys from JIRA.v0.15.0