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:
-
Integration Feature Settings page –
Actions ➜ Edit integration feature settings
-
Update Repository page (integration sub repository) –
Actions ➜ Show integration repositories
- 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 |