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

Contact Support

Gerrit JMESPath filter examples

An optional JMESPath filter can be configured when adding GitHub integration or repositories.

1. Contains (include)

[?contains(name, 'git')]

This is a filter based on the text in the repository name. It will list repositories with names that contain the word 'git'. Do note that the declared string format is case-sensitive.

2. Starts with or ends with

[?starts_with(name, 'git') | ends_with(name, 'test')]

Lists repositories with names that starts with 'git' or ends with 'test'.

3. Contains (exclude)

[?(!contains(name, 'firstword'))]

[?(!contains(name, 'firstword')) | (!contains(name, 'secondword'))]

1 – Lists repositories with names that either do not contain the word 'firstword'.

2 – Lists repositories with names that either do not contain the words ‘firstword’ OR ‘secondword’.

The !condition must be wrapped in a parenthesis so it won’t invert the whole expression.


More articles on JMESPath filter examples

GitHub.com | GitHub Enterprise JMESPath filter examples

GitLab.com | GitLab CE/EE JMESPath filter examples

Microsoft | VSTS | TFS | Azure Repos JMESPath filter examples

Tracked Folders JMESPath filter examples

Gerrit JMESPath filter examples (this page)

GitHub App JMESPath filter examples

Have feedback about this article? Did we miss something? Let us know!
On this page