An optional JMESPath filter can be configured when adding GitLab integration or repositories.
1. Contains (include)
[?contains(name, 'git') | contains(name, 'Slap') | contains(name, 'est')]
This is a filter based on the text in the repository name. It will list repositories that contains the specified names. Do note that the declared string format is case-sensitive.
2. Contains (exclude)
[?(!contains(tag_list, 'largemedia'))]
[?(!contains(name, 'firstword'))]
[?(!contains(name, 'firstword')) | (!contains(name, 'secondword'))]
1 – Blacklists project tag.
2 – Lists repositories with names that either do not contain the word 'firstword'
.
3 – Lists repositories with names that either do not contain the words ‘firstword’
OR ‘secondword’
.
3. Tags
[?contains(tag_list, 'largemedia')]
Whitelists project tag.
GitLab refers to project tags as tags in the API and in some places in the UI but the actual setting is called Topics.
4. 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'
.
5. Exclude projects without repositories
[?!empty_repo]
Lists only repositories from projects that have existing repositories.
More articles on JMESPath filter examples
GitHub.com | GitHub Enterprise JMESPath filter examples
GitLab.com | GitLab CE/EE JMESPath filter examples (this page)
Microsoft | VSTS | TFS | Azure Repos JMESPath filter examples
Tracked Folders JMESPath filter examples
Gerrit JMESPath filter examples
GitHub App JMESPath filter examples
All product names, logos, and brands are property of their respective owners.