Skip to content

Commit

Permalink
Improve selector docs
Browse files Browse the repository at this point in the history
Embarassingly enough we already had some documentation on the provider
selectors before we implemented them, so let's just add an example.

Related: #4564
  • Loading branch information
jhrozek committed Sep 30, 2024
1 parent 5d4c55a commit 1204cdd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/docs/how-to/profile_selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.

Expand Down

0 comments on commit 1204cdd

Please sign in to comment.