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

Contact Support
GitKraken Status  

Microsoft | VSTS | TFS | Azure Repos JMESPath filter examples


 

An optional JMESPath filter can be configured when adding Azure Repos integrations.

 

1. Contains (include)

{value:value[?contains(name, 'example')]}

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

 

2. Contains (exclude)

{value:value[?(!contains(name, 'Test'))]}

Lists repositories with the names that do not contain the word 'test'.

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

 

3. Starts with or ends with

{value:value[?(starts_with(name, 'git')||(ends_with(name, 'test')))]}

{value:value[?(starts_with(name, 'git') || (ends_with(name, 'test')))]}

Lists repositories with the names that start with 'git' or end with 'test'.

 

Other examples

{value:value[?contains(project.state, 'wellFormed')]}

{value:value[?contains(project.name, 'test2')]}

{value:value[?contains(project.visibility, 'private')]}

{value:value[?contains(project.visibility, 'public')]}

  1. Lists repositories from projects where their state is completely created and ready to use.

  2. Lists all repositories from the project named “test2“.

  3. Lists all private repositories.

  4. Lists all public repositories.

 

Do note that the declared string format is case-sensitive.

 


 

More articles on JMESPath filter examples

GitHub.com | GitHub Enterprise JMESPath filter examples

GitHub App JMESPath filter examples

GitLab.com | GitLab CE/EE JMESPath filter examples

Microsoft | VSTS | TFS | Azure Repos JMESPath filter examples (this page)

Tracked Folders JMESPath filter examples

Gerrit JMESPath filter examples

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