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 branch name"
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 branch name
ℹ️ The following regular expression will verify every branch mention a Jira issue ticket at the beginning of the branch name
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!
Branch name will NOT pass the policy:
After fixing the branch name: