Filter-based ruleset targeting

We’ve launched an enhanced ruleset selection experience for organization and enterprise rulesets, simplifying the process of finding and targeting the right repositories. Teams and Enterprise plan users can now leverage custom property filters to swiftly apply ruleset targeting.
What’s new
The ruleset selection interface has been updated with a query-based filter, mirroring GitHub’s search functionality. This provides a consistent and intuitive way to select repositories across the platform.
The new repository selection flow now supports the following targeting modes:
- Repositories matching a filter: Utilize GitHub search syntax (e.g.,
visibility:private props.team:infra -language:java
) to dynamically match current and future repositories based on custom and system repository properties. - All repositories: Apply rules to all repositories within your organization or enterprise.
- Only selected repositories: Choose specific repositories using multi-select functionality.
- Repositories matching a name: Use
fnmatch
patterns to include or exclude repositories.
Why it matters
- Custom properties support: Easily filter repositories using custom properties.
- Improved discoverability: Filter autocomplete assists in building powerful queries.
- Query-based defaults: Organization and enterprise ruleset targeting now defaults to using repositories matching a filter.
Note: Organization and enterprise rulesets no longer permit excluding a custom property value if it was already defined as an included filter.
Try it out
Navigate to any organization or enterprise-level ruleset or policy settings page. In the Target repositories section, select your desired targeting mode, and save your changes.
Join the discussion within GitHub Community.