Skip to content

Commit 11a8947

Browse files
Update organization-rulesets-targeting-repositories-step.md (#56197)
Co-authored-by: Sophie <[email protected]>
1 parent 9afe3c2 commit 11a8947

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

data/reusables/organizations/organization-rulesets-targeting-repositories-step.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,32 @@ For more information about custom properties, see [AUTOTITLE](/organizations/man
44

55
If a repository is targeted by a ruleset created at the organization level, only owners of the organization can edit the ruleset. However, people with admin access to the repository, or with a custom role including the "edit repository rules" permission, can create additional rulesets at the repository level. The rules in these rulesets will be aggregated with the rules defined at the organization level. The result is that creating a new ruleset can make the rules targeting a branch or tag more restrictive, but never less restrictive. For more information on creating rulesets, see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets).
66

7+
#### Targeting repositories by properties in your organization
8+
9+
You can target repositories in your organization by custom properties. See [AUTOTITLE](/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization).
10+
11+
1. To target a dynamic list of repositories in your organization by properties, in the "Target repositories" section, next to "Repository targeting criteria" select **Repositories matching a filter**.
12+
1. To add a target, in the filter section, **enter a query** for example, `visibility:private props.team:infra -language:java` or **Select by filter**.
13+
1. In the modal dialog that appears, select custom or system properties from the dropdown menu, then select a value for each property.
14+
1. Click **Apply**.
15+
716
#### Targeting all repositories in your organization
817

9-
To target all repositories in your organization, in the "Target repositories" section, select **{% octicon "goal" aria-hidden="true" aria-label="goal" %} Target: REPOSITORIES**, then click **All repositories**.
18+
To target all repositories in your organization, in the "Target repositories" section, next to
19+
"Repository targeting criteria", select **All repositories**.
20+
21+
#### Targeting select repositories in your organization
22+
23+
1. To target a static, manually selected list of repositories in your organization, in the "Target repositories" section, next to "Repository targeting criteria", select **Only selected repositories**.
24+
1. To select repositories to target, in the "Targeting criteria" section, select **{% octicon "repo" aria-hidden="true" aria-label="repo" %} Select repositories**, then search for the name of each repository you would like to target. Select each repository from the search results.
1025

1126
#### Targeting repositories by naming convention in your organization
1227

13-
1. To target a dynamic list of repositories in your organization by naming convention, in the "Target repositories" section, select **{% octicon "goal" aria-hidden="true" aria-label="goal" %} Target: REPOSITORIES**, then click **Dynamic list of repositories**.
28+
1. To target a dynamic list of repositories in your organization by naming convention, in the "Target repositories" section, next to "Repository targeting criteria", select **Repositories matching a name**.
1429
1. To begin defining a targeting pattern, in the "Targeting criteria" section, select **Add a target** {% octicon "triangle-down" aria-hidden="true" aria-label="triangle-down" %}, then click **Include by pattern** or **Exclude by pattern**.
1530
1. In the modal dialog that appears, enter a repository naming pattern using `fnmatch` syntax, then click **Add Inclusion pattern** or **Add Exclusion pattern**. For more information on `fnmatch` syntax, see [Using `fnmatch` syntax](#using-fnmatch-syntax).
1631

1732
> [!NOTE]
1833
> You can add multiple targeting criteria to the same ruleset. For example, you could include any repositories matching the pattern `*cat*`, then specifically exclude a repository matching the pattern `not-a-cat`.
1934
2035
1. Optionally, on the ruleset configuration page, select **Prevent renaming of target repositories**.
21-
22-
#### Targeting repositories by properties in your organization
23-
24-
You can target repositories in your organization by custom properties. For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization).
25-
26-
1. To target a dynamic list of repositories in your organization by properties, in the "Target repositories" section, select **{% octicon "goal" aria-hidden="true" aria-label="goal" %} Target: REPOSITORIES**, then click **Dynamic list by property**.
27-
1. To add a target, in the "Targeting criteria" section, select **Add a target** {% octicon "triangle-down" aria-hidden="true" aria-label="triangle-down" %}, then click **Include by property** or **Exclude by property**.
28-
1. In the modal dialog that appears, select a custom or system property from the dropdown menu, then select a value for the property.
29-
1. Click **Add target**.
30-
31-
#### Targeting select repositories in your organization
32-
33-
1. To target a static, manually selected list of repositories in your organization, in the "Target repositories" section, select **{% octicon "goal" aria-hidden="true" aria-label="goal" %} Target: REPOSITORIES**, then click **Select repositories**.
34-
1. To select repositories to target, in the "Targeting criteria" section, select **{% octicon "repo" aria-hidden="true" aria-label="repo" %} Select repositories**, then search for the name of each repository you would like to target. Select each repository from the search results.

0 commit comments

Comments
 (0)