April 30th 1 PM ET

Git Integration for Jira Self-Managed (Data Center/Server) Documentation

Pull request filters

NEW FEATURE VERSION 4.19+

This feature allows administrators to hide pull requests and branches based on a filter/regex. The Git Integration for Jira app supports integration or repository level filter.

The PR filter is available on the following locations:

  1. Integration Feature Settings page  Actions ➜ Edit integration feature settings

    Pull request filter location 1
  2. Update Repository page (integration sub repository)  Actions ➜ Show integration repositories

    Pull request filter location 2
The PR filter is not available on the following locations:

  • Update Repository page for plain repository – Actions ➜ Edit repository settings.
  • Update Repository page for repositories belonging to a tracked folder – Actions ➜ Edit repository settings.

 

Basic regex examples

  • The prHideFilter will hide PR starting with word/phrase “[mq-bot]”, e.g. “[mq-bot] This is a test Pull Request”.

    ^[mq-bot].*

  • The prHideFilter will hide PR starting with word/phrase “Test” or “test”, e.g. “Test Pull Request”.

    ^(Test|test).*

 

More advanced examples

For the example list of PRs (or MRs): TEST-1 pr_1, TEST-1 pr_2, TEST-1 pr_23, TEST-1 pr_3, TEST-1 pr_4 – the following expressions can be used:

Action RegExp Hide result PR list result
Hide all PRs .* all none
Hide only TEST-1 pr_1 ((^|, )(TEST-1 pr_1))+$ TEST-1 pr_1 TEST-1 pr_2
TEST-1 pr_23
TEST-1 pr_3
TEST-1 pr_4
Hides anything that does NOT contain the TEST-1 pr_2 phrase ^((?!TEST-1 pr_2).)*$ TEST-1 pr_1
TEST-1 pr_3
TEST-1 pr_4
TEST-1 pr_2
TEST-1 pr_23
Hide all PRs BUT TEST-1 pr_2 ^((?!((^|, )(TEST-1 pr_2))+$).)*$ TEST-1 pr_1
TEST-1 pr_23
TEST-1 pr_3
TEST-1 pr_4
TEST-1 pr_2
Hide some PRs: TEST-1 pr_1, TEST-1 pr_2, TEST-1 pr_3 ((^|, )(TEST-1 pr_[1-3]))+$ TEST-1 pr_1
TEST-1 pr_2
TEST-1 pr_3
TEST-1 pr_23
TEST-1 pr_4
Have feedback about this article? Did we miss something? Let us know!
On this page