From 1204cdd2129a71d4e83721c973da438be4ea0a44 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 30 Sep 2024 17:50:45 +0200 Subject: [PATCH] Improve selector docs Embarassingly enough we already had some documentation on the provider selectors before we implemented them, so let's just add an example. Related: #4564 --- docs/docs/how-to/profile_selectors.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/docs/how-to/profile_selectors.md b/docs/docs/how-to/profile_selectors.md index 3434345404..039a639aa2 100644 --- a/docs/docs/how-to/profile_selectors.md +++ b/docs/docs/how-to/profile_selectors.md @@ -36,6 +36,9 @@ selection: - entity: repository selector: repository.properties['github/primary_language'] == 'Go' comment: "Only Go repositories" + - entity: repository + selector: repository.provider.class == 'github-app' + comment: "Only github repositories" ``` Let's break down the example above: @@ -45,6 +48,8 @@ Let's break down the example above: - The first selector filters repositories to include only those that are not forks and whose name starts with stacklok. In other words, those that are part of the stacklok organization. - The second selector filters artifacts to include only those provided by `github-app-stacklok`. - The third selector filters repositories to include only those with a GPL license and the fourth selector filters repositories to include only those written in Go. These two selectors use the properties map which is provider-specific. + - The fourth selector filters repositories to include only that use Go as the primary language. + - The fifth selector filters repositories to include only those provided by the GitHub provider. Below you can find the full list of selectors available for each entity type.