Imagine you are a PHPStorm developer at JetBrains, your project in the tracker is called "WI".
Then your configuration will be as follows:
rules:
"@mr-linter/title_starts_with_task_number":
projectCodes:
- "WI"
The simplest example that allows you to set any labels.
rules:
"@mr-linter/has_any_labels": {}
You can also specify a list of allowed labels.
rules:
"@mr-linter/has_any_labels":
labels:
- Feature
- Bug
- Docs
- Tests
- Optimization
This example shows how to make the changelog update required on the master branch.
rules:
"@mr-linter/has_changes":
- changes:
- file: "CHANGELOG.MD"
when:
targetBranch:
equals: "master"
Imagine that you are a developer of the Laravel framework, with every merge in the master, you need to update the application version in the Application.php file.
To remember to update the VERSION constant, use the following configuration.
rules:
"@mr-linter/has_changes":
- changes:
- file: "src/Illuminate/Foundation/Application.php"
updatedPhpConstant: "VERSION"
when:
targetBranch:
equals: "master"