Pull Request description
  • 30 May 2019
  • 1 Minute To Read
  • Contributors
  • Share
  • Dark

Pull Request description

  • 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 description"


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 Docker image property


πŸ™Š Mandatory Pull Request description:

For example, setting the regular expression .{10,} will make sure the Pull Request description won't be empty (must includ at least 10 characters).

πŸ™ˆ Pull Request template followed:

For example, setting the regular expression -\s\[x\] will make sure at lease one item is checked in the Pull Request template list.

πŸ™‰ Completion of task lists:

RegEx: (-\s\[x\].+\r?\n?){<NUMBER_OF_ITEMS>}

For example, if I have 5 items on my task list (A.K.A checklist) the regular expression (-\s\[x\].+\r?\n?){5} will verify the rule is passing only when all items are checked as "done".

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!

Pull Request description which will NOT pass the policy:



After updating the Pull Request description:



Was This Article Helpful?