Skip to content

Guardrails

git ​

7 guardrails, all at version v1.

GuardrailDefault severityWhat it checks
git/author-identity-domainwarningEvery commit in the build range was authored and committed with an email address on a domain your organisation controls.
git/changed-files-budgetinfoThe build range changes few enough files that a reviewer can hold the whole change in their head.
git/changed-lines-budgetinfoThe build range adds and removes few enough lines that a reviewer can read the whole change before approving it.
git/conventional-commitserrorEvery commit message in the build range follows the Conventional Commits specification, including the subject line, the blank line before the body, and the BREAKING CHANGE footer.
git/no-merge-commitswarningThe build range contains no merge commits.
git/no-wip-commitswarningThe build range contains no commit whose subject says it was never meant to be merged.
git/work-item-referencewarningEvery commit in the build range, or the branch it is on, references the change record it belongs to.

Shared inputs ​

Every git guardrail declares these inputs. Individual guardrails can add their own.

InputDescriptionDefault
baseRefRef the range starts at. The commits checked are <baseRef>..HEAD.origin/main

Shared collectors ​

Every git guardrail receives the facts these collectors gather. Individual guardrails can ask for more collectors of their own.

CollectorGathers
gitThe repository, HEAD, the remotes, and every commit between the base ref and HEAD with its message, author, parents, and the files the range changed with the lines it added and removed to each.

You configure every guardrail in this category the same way, in the guardrails.checks array of buildnote.json. Configuring guardrails lists every option, and Guardrails lets you search the whole library.

Buildnote Limited
Registered in England and Wales, Reg: 16140412