Want to exclude some pesky prs?
Many teams want to exclude a few key pull requests so they don't skew their data. In this article, we'll show you how to do that.
Note: Excluded pull requests are removed from both dashboard and alerts.
What can I exclude?
There are a few ways to exclude pull requests. We'll walk through a few examples on how to exclude based on:
- Pull Request Label (e.g. labels contain 'WIP')
- Pull Request Title (e.g. title contains 'test')
- Draft Pull Requests (e.g. pull request is 'draft')
How to create a global filter in Haystack
Step 1: Go to Settings
Click on the 'Settings' tab in the left sidebar to open up Haystack settings.
Step 2: Go to Settings > Filters
Click on 'Filters' in the left sidebar to view your current filters.
Step 3: Exclude Labels
Select which pull request labels you would like to exclude by typing into the search bar. A list of options will appear to select from.
If you do not see a particular label, simply type the label by name and hit enter. Haystack will exclude pull requests with that label string (case senstivie).
Note: Label options are retrieved from pull requests created in the past 6 months. If a new label was recently created, it may take a few hours to appear.
Step 4: Exclude Terms
Select which terms you would like to exclude by typing into the search bar and hitting 'enter' when you're done. Any pull request that contains this term (case sensitive) will be removed from your data.
Step 5: Exclude Drafts
Select "Yes, Exclude Drafts" if you would like to exclude Draft pull requests from your data. This will ensure the Haystack dashboard and alerts do not include draft pull requests.
Step 6 Click "Update"
Click "Update" to save your changes.
Step 7: You're Done!
Now that you've updated your global filters, Haystack will remove any pull request matching your filter settings.
You can now go back to your dashboard and see the changes!