Based on your review work flow there may be a need to exclude reviewer or submitter comments that are affecting your pull request metrics. Using the feature outlined below, you can exclude PR comments from your reports and metrics using regular expressions.
How to exclude pull request comments
To exclude PR comments from your reports you will need the Configurations permission.
Step 1: If you have adequate permissions go to the top navigation bar and click Settings. From the left navigation under Report Settings click Configurations.
Step 2: Under the General tab, locate the Pull Request Comments to Exclude section and click New rule.
Step 3: Add your regular expression and select where match the expression on:
- Match on user - Match on comment author
- Match on text - Match on comment text
Step 4: You can test your regular expression on existing PR comments by clicking Test a Regular Expression. In this modal you can input your regular expression and test it against the most recent 100 PR comments. This will help you ensure that your regular expression is matching on the PR comments you want to exclude.
Step 5: When you are finished adding in your rule/s click Save Changes at the bottom of the page and you will be prompted to re-score your PRs based on the exclusion rules.
Step 6: Once the PR reprocessing has finished, excluded PR comments will appear in your reports as depicted below:
Work log report and PR details:
Review and collaboration reports
Want to exclude the entire PR from your metrics, check out How to exclude PRs.
If you need help, please email email@example.com for 24/7 assistance.