UserDefinedLabelCheck

This check confirms that a specific label or a label that matches a specific pattern is present on all changesets.

Uses

Use the check to confirm when a specific label or a label that matches a specific pattern is present on all changesets. More specifically, UserDefinedLabelCheck uses a regular expression to ensure that the label fits a particular Jira or CRQ format.

Run the UserDefinedLabelCheck check

To run the UserDefinedLabelCheck check, ensure you have a Liquibase Pro license and the checks-scope property includes changelog. The checks-scope parameter is set in the default properties file, environment variable, or any standard method. Then, check the changelog to see if UserDefinedLabelCheck is enabled

Enable the UserDefinedLabelCheck check by running the following command in the CLI:

liquibase checks copy --check-name=UserDefinedLabelCheck
Short Name Scope Enabled Severity Customization Description
UserDefinedLabelCheck changelog

False

Default value: 0

  • 'INFO' | 0
  • 'MINOR' | 1
  • 'MAJOR' | 2
  • 'CRITICAL' | 3
  • 'BLOCKER' | 4

<None>

This check confirms that a specific label or a label that matches a specific pattern is present on all changesets.

UserDefinedLabelCheck configurable attributes

The following table identifies attributes that are configurable by UserDefinedLabelCheck.

Attribute Name Type Description Customization Default Value
OPERATOR String/enum

The location to look for the provided SEARCH_STRING value

  • STARTS_WITH – Value of SEARCH_STRING should be found at the beginning of the table.
  • ENDS_WITH – Value of SEARCH_STRING should be found at the end of the table.
  • CONTAINS – Value of SEARCH_STRING can be anywhere in the table.
  • REGEXP – Value of SEARCH_STRING is a regexp that should be matched.
  • EQUALS - Value of SEARCH_STRING should equal this entry.

STARTS_WITH

SEARCH_STRING String/enum

The substring or regular expression to match with the one in the changelog file. Cannot be empty.

When OPERATOR=REGEXP, SEARCH_STRING must be a valid regular expression. Otherwise, all characters are allowed

--
SEVERITY String/enum

Set the severity to return a code of 0–4 when the check is triggered. Default: 0.

  • 'INFO' | 0
  • 'MINOR' | 1
  • 'MAJOR' | 2
  • 'CRITICAL' | 3
  • 'BLOCKER' | 4

'INFO' | 0