The following rules are available:
Name | Description |
---|---|
@mr-linter/changed_files_limit | Check count changed files on a {limit}. |
@mr-linter/description_contains_links_of_any_domains | Merge Request must contain links of any {domains}. |
@mr-linter/description_contains_links_of_all_domains | Merge Request must contain links of all {domains}. |
@mr-linter/description_not_empty | The description must be filled. |
@mr-linter/has_any_labels | Merge Request must have any {labels}. |
@mr-linter/jira/has_issue_link | The description must have a link to Jira on a {domain} with {projectCode}. |
@mr-linter/youtrack/has_issue_link | The description must have a link to YouTrack issue on a {domain} with {projectCode}. |
@mr-linter/title_must_starts_with_any_prefix | The title must starts with any {prefixes} |
@mr-linter/has_changes | Merge Request must have {changes}. |
@mr-linter/title_starts_with_task_number | Title must starts with task number of project {projectCodes}. Mask: {projectCode}-number |
@mr-linter/branch_starts_with_task_number | Source branch must starts with task number of project {projectCodes}. Mask: {projectCode}-number |
@mr-linter/forbid_changes | Forbid changes for files. |
@mr-linter/changelog_has_new_release | Changelog must be contained new release. |
@mr-linter/diff_limit | The request must contain no more than {linesMax} changes. |
@mr-linter/no_ssh_keys | Prevent ssh keys from being included in the merge request. |
@mr-linter/disable_file_extensions | Disable adding files of certain extensions. |
@mr-linter/title_conventional | The title must match conventional commit pattern https://www.conventionalcommits.org/en/v1.0.0. |
@mr-linter/description_template | The description must match defined template. Available placeholders: {text}, {text_multiline}, {number}, {word}, {release_tag} |
Name | Description | Type | Default value |
---|---|---|---|
critical | when critical = true the pipeline will fall when critical = false the pipeline will not fall, the error will be suppressed |
boolean | false |
when | conditions for triggering the rule | object | null |
Check count changed files on a {limit}.
Name | Description | Type | Required | Default value |
---|---|---|---|---|
limit | Number of maximum possible changes | integer | true |
Merge Request must contain links of any {domains}.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
domains | Array of domains | array of strings | true | "host.name" |
Merge Request must contain links of all {domains}.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
domains | Array of domains | array of strings | true | "host.name" |
The description must be filled.
Merge Request must have any {labels}.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
labels | Array of labels | array of strings | true | "Feature", "Bug" |
The description must have a link to Jira on a {domain} with {projectCode}.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
domain | Domain of Jira instance | string | true | "jira.my-company.com" | |
projectCodes | Project code | array of strings | false | "ABC" |
The description must have a link to YouTrack issue on a {domain} with {projectCode}.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
domain | Domain hosting the YouTrack instance | string | true | "yt.my-company.ru" | |
projectCodes | Project code | array of strings | false | "PORTAL" |
The title must starts with any {prefixes}
Name | Description | Type | Required | Default value |
---|---|---|---|---|
prefixes | Array of prefixes | array of strings | true |
Merge Request must have {changes}.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
changes | Array of need changes | array of objects | true | ||
changes.* | Array of need changes | array of objects | true | none | |
changes.*.file | Relative path to file | string | true | "file.txt" | |
changes.*.contains | Check contains string | string | false | ||
changes.*.containsRegex | Check contains by regex | string | false | ||
changes.*.updatedPhpConstant | Check contains updated PHP constant | string | false | "VERSION" |
Title must starts with task number of project {projectCodes}. Mask: {projectCode}-number
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
projectCodes | Project codes. Empty list allowed for any projects | array of strings | false | "ABC" |
Source branch must starts with task number of project {projectCodes}. Mask: {projectCode}-number
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
projectCodes | Project codes. Empty list allowed for any projects | array of strings | false | "ABC" |
Forbid changes for files.
Name | Description | Type | Required | Default value |
---|---|---|---|---|
files | A set of files forbidden to be changed. | array of strings | true |
Changelog must be contained new release.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
file | Relative path to changelog file | string | false | "CHANGELOG.md" | |
changes | Configuration for changes reading | object | false | ||
changes.types | Set of allowed change types | array | false | [Added, Changed, Deprecated, Removed, Fixed, Security] |
The request must contain no more than {linesMax} changes.
Name | Description | Type | Required | Default value |
---|---|---|---|---|
linesMax | Maximum allowed number of changed lines | integer | false | |
fileLinesMax | Maximum allowed number of changed lines in a file | integer | false |
Prevent ssh keys from being included in the merge request.
Name | Description | Type | Required | Default value |
---|---|---|---|---|
stopOnFirstFailure | When the value is true, the search will stop after the first found key | boolean | true |
Disable adding files of certain extensions.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
extensions | Array of file extensions | array of strings | true | "pem", "pub", "php" |
The title must match conventional commit pattern https://www.conventionalcommits.org/en/v1.0.0.
Name | Description | Type | Required | Default value | Examples |
---|---|---|---|---|---|
types | Commit types | array of strings | false | [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] |
"build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test" |
task | Check if title contains task number | object | false | NULL | |
task.projectCodes | Project codes. Empty list allowed for any projects | array of strings | false | "ABC" |
The description must match defined template. Available placeholders: {text}, {text_multiline}, {number}, {word}, {release_tag}
Name | Description | Type | Required | Default value |
---|---|---|---|---|
template | Template for description | string | true | |
definition | Custom definition | string | false | NULL |