Pull request tilte
  • 22 Apr 2019
  • 1 Minute To Read
  • Contributors
  • Share
  • Dark

Pull request tilte

  • Share
  • Dark

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:

A. 323a3cc-Screen_Shot_2019-03-19_at_10.49.01

B. c3199c1-Screen_Shot_2019-03-19_at_10.52.30

C. fbd3086-Screen_Shot_2019-03-19_at_10.50.04

After fixing the PR title:

A. 8ebba8d-Screen_Shot_2019-03-19_at_10.55.47

B. c42e8e2-Screen_Shot_2019-03-19_at_10.56.10

Was This Article Helpful?