Go to Datree's "custom rules" tab and click on "create new rule" button
1. Choose custom rule type
Step 1 at the wizard - choose "custom pull request title"
2. Edit custom rule details
The rule description will be shown on the custom rule dashboard, while the rule title will be used on GitHub "smart policy" check
3. Configure your custom rule
- Regular Expression - which pattern should be validated for the pull request title
ℹ️ The following regular expression will verify that every pull request title has at least 3 (not space/empty) characters:
- Test Text - an input box to test your regex 😎
4. Wrap it up
Click on the "create" button to add your custom policy to the policies menu on the left
By default, the rule will not be enabled until explicitly defining repositories
5. See your custom policy in action!
PR title will NOT pass the policy:
After fixing the PR title: