Exclude pull requests and pull request comments

Tags: Flow

Based on your review workflow, use regular expressions to exclude pull requests and pull request comments from your reports and metrics.

For Flow to represent your most relevant and important data, exclude PRs you don’t want included in your metrics, such as:

  • Work in progress PRs (WIP)
  • Draft PRs

Note: You cannot exclude pull requests based on their status.


Permissions

You need the Configurations permission to exclude PRs and PR comments from your reports.

Excluding pull requests

To exclude PRs:

  1. Click Settings in Flow’s top navigation bar.
  2. In the left navigation under Report Settings, click Configurations.
  3. On the General tab of the Configuration page, under Pull request to exclude, click Create rule.
  4. Add your regular expression and select where to match the expression on:
    • Match on user—Match regular expression on the PR author
    • Match on title—Match regular expression on the title of the PR
    • Match on label—Match regular expression on the PR label (PR #1234)
  5. Test your regular expression on existing PRs by clicking Test a Regular Expression. In this modal you can input specific PRs to test on, or to view the most recent 100 PRs. This helps you ensure that your regular expression matches the PRs you want to exclude. If a PR matches your regular expression, it is labeled with Matches.

    Note: By default, the regular expression matches from the beginning of the text. Either include all characters from the beginning of the text in the Regular expression box, or use a wildcard like .*.

  6. Once you've added your rules, click Save Changes at the bottom of the page and click Confirm. You'll be prompted to reprocess your PRs based on the exclusion rules.

Note: Changing Pull Request Tracking can cause slight delays in processing pull requests.

Once the PR reprocessing finishes, PRs appear as excluded in your reports. Excluded PRs display differently in each report. Excluded PRs do not count toward PR-based collaboration metrics. If a PR changes so the rules no longer apply to it, Flow reprocesses the PR and adds it back to reports and metrics.

Note: While PRs cannot be excluded based on status, if you include words like "WIP" or "Draft" as part of the title, they'll be excluded from Flow as long as they have that in the title. When the title changes to remove those terms, Flow reprocesses and shows the PRs in reports. For time-based metrics like Time to first comment or Time to merge, the creation date of the PR is used to calculate the metric, not the time when Flow adds the PR back to reports and metrics.

Excluded PRs appear in the PR activity lane of the Work log report with a slash through the cells. Learn more about Work log.

Excluded PRs appear in the Review workflow report with a strikethrough on the PR number. Learn more about Review workflow.

back to top


Excluding pull request comments

To exclude pull request comments:

  1. Click Settings in Flow’s top navigation bar.
  2. In the left navigation under Report Settings, click Configurations.
  3. On the General tab of the Configuration page, click Create rule under Pull request comments to exclude.
  4. Add a regular expression to exclude PR comments by.

    Note: By default, the regular expression matches from the beginning of the text. Either include all characters from the beginning of the text in the Regular expression box or use a wildcard like .*.

  5. Select to match the expression on:
    • Match on user—Match on comment author
    • Match on text—Match on comment text
  6. Click Test a Regular Expression to test your regular expression on existing PR comments.
  7. Input your regular expression and test it against the most recent 100 PR comments. This helps ensure your regular expression matches the PR comments you want to exclude. Any comments that match your regular expressions have a blue Matches label on the right.
  8. When you finish adding rules, click Yes, save changes at the bottom of the page and confirm.

After saving your new exclusion rules, click Reprocess to reprocess your PRs based on the exclusion rules.

Once the PR reprocessing finishes, excluded PR comments appear in your reports. Excluded PRs display differently in each report. Excluded PR comments do not count toward PR comment-based collaboration metrics.

Excluded PR comments appear in the PR comment lane of the Work log report with a slash through them. Learn more about Work log.

Excluded PR comments appear in the Review workflow report as a gray bar on a PR’s timeline. Learn more about Review workflow.

back to top


If you need help, please contact Pluralsight Support.