Skip to content

Commit a34ca63

Browse files
authored
Merge pull request #35550 from github/repo-sync
Repo sync
2 parents e6e1cda + b983cb5 commit a34ca63

27 files changed

+312
-14
lines changed

content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/about-enterprise-policies.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@ To help you enforce business rules and regulatory compliance, policies provide a
1818

1919
For example, with the "Base permissions" policy, you can allow organization owners to configure the "Base permissions" policy for their organization, or you can enforce a specific base permissions level, such as "Read", for all organizations within the enterprise.
2020

21-
By default, no enterprise policies are enforced. To identify policies that should be enforced to meet the unique requirements of your business, we recommend reviewing all the available policies in your enterprise account, starting with repository management policies. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise)."
21+
## Enforcing policies
22+
23+
By default, no enterprise policies are enforced. To identify policies that should be enforced to meet the unique requirements of your business, we recommend reviewing all the available policies in your enterprise account, starting with repository management policies.
2224

2325
While you're configuring enterprise policies, to help you understand the impact of changing each policy, you can view the current configurations for the organizations owned by your enterprise.
2426

27+
{% data reusables.enterprise.repo-policy-rules-alternative %}
28+
29+
For a full list of repository management policies, see "[AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise)."
30+
2531
{% ifversion ghes %}
2632
Another way to enforce standards within your enterprise is to use pre-receive hooks, which are scripts that run on {% data variables.location.product_location %} to implement quality checks. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policy-with-pre-receive-hooks)."
2733
{% endif %}

content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ shortTitle: Repository management policies
4848

4949
## About policies for repository management in your enterprise
5050

51-
You can enforce policies to control how members of your enterprise on {% data variables.product.product_name %} manage repositories. You can also allow organization owners to manage policies for repository management. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories)" and "[AUTOTITLE](/organizations)."
51+
You can enforce policies to control how members of your enterprise on {% data variables.product.product_name %} manage repositories. You can also allow organization owners to manage policies for repository management.
52+
53+
{% ifversion repo-policy-rules %}
54+
>[!NOTE] This page describes the policies you can set on the "Member privileges" page in your enterprise settings. Certain restrictions, such as who can create, delete, or transfer repositories, are also available in a **repository policy**. Repository policies give you more flexibility over which users are affected and which organizations and repositories are targeted. See "[AUTOTITLE](/admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/governing-how-people-use-repositories-in-your-enterprise)."
55+
{% endif %}
5256

5357
{% ifversion ghes %}
5458

@@ -197,7 +201,8 @@ Across all organizations owned by your enterprise, you can allow members with ad
197201

198202
{% data reusables.enterprise-accounts.access-enterprise %}
199203
{% data reusables.enterprise-accounts.policies-tab %}
200-
1. On the **Repository policies** tab, under "Repository issue deletion", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
204+
{% data reusables.enterprise-accounts.repositories-tab %}
205+
1. Under "Repository issue deletion", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
201206
1. Under "Repository issue deletion", select the dropdown menu and click a policy.
202207

203208
{% ifversion ghes %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: Governing how people use repositories in your enterprise
3+
intro: "Create a repository policy to control who can do things like create and delete repositories."
4+
permissions: Enterprise owners
5+
versions:
6+
feature: repo-policy-rules
7+
type: how_to
8+
topics:
9+
- Enterprise
10+
- Repositories
11+
shortTitle: Govern repository usage
12+
---
13+
14+
{% data reusables.enterprise.repo-policy-rules-preview %}
15+
16+
{% data reusables.enterprise.repo-policy-rules-intro %}
17+
18+
>[!TIP] If you're an **organization owner**, you can create a repository policy for a specific organization. See "[AUTOTITLE](/organizations/managing-organization-settings/governing-how-people-use-repositories-in-your-organization)."
19+
20+
## Examples
21+
22+
{% data reusables.enterprise.repo-policy-rules-examples %}
23+
24+
## How will I target repositories?
25+
26+
First, you'll target organizations in your enterprise. You can select all organizations, choose from a list, or create a dynamic rule using `fnmatch` syntax. If you use {% data variables.product.prodname_emus %}, you can also choose to target all repositories owned by users in your enterprise.
27+
28+
Then, you'll target repositories in the selected organizations. {% data reusables.enterprise.repo-policy-rules-with-custom-properties %}
29+
30+
## Interaction with other policies
31+
32+
{% data reusables.enterprise.repo-policy-rules-with-existing-policies %}
33+
* They're visible to organization owners, so there is more transparency around what is permitted.
34+
* They allow you to target repositories owned by {% data variables.product.prodname_emus %}.
35+
36+
## Creating a repository policy
37+
38+
{% data reusables.enterprise-accounts.access-enterprise %}
39+
{% data reusables.enterprise-accounts.policies-tab %}
40+
1. Under "Policies", click **Repository**.
41+
1. Click **New policy**.
42+
1. Configure your new policy, then click **Create**. For help, consult the following subsections.
43+
44+
### Policy name
45+
46+
Use something descriptive to communicate the purpose of the policy. Organization owners can view the policy, so good names help add clarity. For example: `Prevent public repos on production`.
47+
48+
### Enforcement status
49+
50+
{% data reusables.enterprise.repo-policy-rules-enforcement %}
51+
52+
### Allow list
53+
54+
{% data reusables.enterprise.repo-policy-rules-allow-list %}
55+
56+
### Targets
57+
58+
Choose which organizations and repositories the policy applies to.
59+
60+
#### Target organizations
61+
62+
Select all organizations, choose a selection of existing organizations, or set a dynamic list by name. If you use {% data variables.product.prodname_emus %}, you can also choose to target all repositories owned by users in your enterprise.
63+
64+
If you set a dynamic list, you'll add one or more naming patterns using `fnmatch` syntax. For example, the string `*open-source` would match any organization with a name that ends with `open-source`. For syntax details, see "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository#using-fnmatch-syntax)."
65+
66+
#### Target repositories
67+
68+
Choose which repositories (current or future) to target in the selected organizations. You can select all repositories or set a dynamic list by custom property.
69+
70+
### Policies
71+
72+
{% data reusables.enterprise.repo-policy-rules-policies-section %}
73+
74+
## Further reading
75+
76+
To set additional policies for repository management, see "[AUTOTITLE](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise)."

content/admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ versions:
1111
topics:
1212
- Enterprise
1313
children:
14+
- /governing-how-people-use-repositories-in-your-enterprise
1415
- /viewing-user-owned-repositories-in-your-enterprise
1516
- /accessing-user-owned-repositories-in-your-enterprise
17+
- /managing-custom-properties-for-repositories-in-your-enterprise
1618
- /configuring-git-large-file-storage-for-your-enterprise
1719
- /disabling-git-ssh-access-on-your-enterprise
1820
- /locking-a-repository
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Managing custom properties for repositories in your enterprise
3+
intro: 'Create custom properties to give organizations a consistent way to categorize repositories.'
4+
permissions: Enterprise owners
5+
versions:
6+
ghec: '*'
7+
topics:
8+
- Repositories
9+
shortTitle: Custom properties
10+
---
11+
12+
> [!NOTE] Custom properties for your enterprise are in {% data variables.release-phases.public_preview %} and subject to change.
13+
14+
Custom properties allow you to decorate your repositories with information such as compliance frameworks, data sensitivity, or project details. Custom properties are private and can only be viewed by people with read permissions to the repository. An enterprise can have up to 100 property definitions. An allowed value list can have up to 200 items.
15+
16+
Defining custom properties at the enterprise level allows you to create consistent values that users can apply to repositories. With custom properties in place, you can apply consistent governance across repositories in your enterprise by creating a ruleset or repository policy targeting repositories with certain properties. See "[AUTOTITLE](/admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/governing-how-people-use-repositories-in-your-enterprise)."
17+
18+
## Allowed characters
19+
20+
{% data reusables.repositories.custom-property-allowed-characters %}
21+
22+
## Who can set and view values for custom properties I define?
23+
24+
After you define a custom property, users can set a value for that property in repositories in the enterprise. See "[AUTOTITLE](/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization#setting-values-for-repositories-in-your-organization)."
25+
26+
* As an enterprise owner, you can set a default value for required properties.
27+
* Organization owners can set values in their organization, either across repositories or at the repository level.
28+
* If enabled, people with repository access, or the `custom properties` fine-grained permission, can set and update the property value for their repository.
29+
30+
People with read permissions to a repository can view the custom property values for that repository.
31+
32+
Additionally, organization owners can search for repositories in their organization by custom property values. See "[AUTOTITLE](/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization#searching-and-filtering-repositories-by-custom-property-values)."
33+
34+
## Adding custom properties
35+
36+
You can add custom properties to your enterprise to make those properties available in all of your orgaizations.
37+
38+
{% data reusables.enterprise-accounts.access-enterprise %}
39+
1. In the left sidebar, under "Policies", click **Custom properties**.
40+
1. To add a new custom property, in the upper-right corner, click **New property**.
41+
1. Enter a name, description, and type for the custom property. The name must be unique across all of your organizations, and cannot contain spaces.
42+
1. Optionally, select **Allow repository actors to set this property**. When enabled, repository users and apps with the repository-level `custom properties` fine-grained permission will be able to set and update the property value for their repository. Additionally, any actor creating a repository can set the property on the repository.
43+
1. Optionally, select **Require this property for all repositories** and add a default value. This means that you require that all repositories in your enterprise have a value for this property. Repositories that don’t have an explicit value for this property will inherit the default value.
44+
1. Click **Save property**.

content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,14 @@ To search for specific events, use the `action` qualifier in your query. Actions
4646
| {% ifversion fpt or ghec %} |
4747
| `billing` | Contains all activities related to your organization's billing.
4848
| `business` | Contains activities related to business settings for an enterprise. |
49-
| `codespaces` | Contains all activities related to your organization's codespaces. |
5049
| {% endif %} |
50+
| {% ifversion fpt or ghec or ghes > 3.16 %} |
51+
| `code-scanning` | Contains all activities related to your organization's code scanning alerts. |
52+
| {% endif %} |
53+
| {% ifversion fpt or ghec %} |
54+
| `codespaces` | Contains all activities related to your organization's codespaces. |
5155
| `copilot` | Contains all activities related to your {% data variables.product.prodname_copilot_for_business %} or {% data variables.product.prodname_copilot_enterprise %} subscription.
56+
| {% endif %} |
5257
| `dependabot_alerts` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_alerts %} in existing repositories. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)."
5358
| `dependabot_alerts_new_repos` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_alerts %} in new repositories created in the organization.
5459
| `dependabot_security_updates` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_security_updates %} in existing repositories. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Governing how people use repositories in your organization
3+
intro: "Create a repository policy to control who can do things like create and delete repositories."
4+
permissions: Organization owners
5+
versions:
6+
feature: repo-policy-rules
7+
type: how_to
8+
topics:
9+
- Repositories
10+
shortTitle: Govern repository usage
11+
---
12+
13+
{% data reusables.enterprise.repo-policy-rules-preview %}
14+
15+
{% data reusables.enterprise.repo-policy-rules-intro %}
16+
17+
>[!TIP] If you're an **enterprise owner**, you can create a repository policy that applies to multiple organizations. See "[AUTOTITLE](/admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/governing-how-people-use-repositories-in-your-enterprise)."
18+
19+
## Examples
20+
21+
{% data reusables.enterprise.repo-policy-rules-examples %}
22+
23+
## How will I target repositories?
24+
25+
{% data reusables.enterprise.repo-policy-rules-with-custom-properties %}
26+
27+
As an alternative to custom properties, you can choose from a list of repositories or use `fnmatch` syntax to target repositories with certain naming patterns.
28+
29+
## Interaction with other policies
30+
31+
{% data reusables.enterprise.repo-policy-rules-with-existing-policies %}
32+
33+
## Creating a repository policy
34+
35+
{% data reusables.profile.access_org %}
36+
{% data reusables.profile.org_settings %}
37+
1. On the left side of the page, in the sidebar, click **{% octicon "law" aria-hidden="true" %} Policies**.
38+
1. Under "Policies", click **Repository**.
39+
1. Click **New policy**.
40+
1. Configure your new policy, then click **Create**. For help, consult the following subsections.
41+
42+
### Policy name
43+
44+
Use something descriptive to communicate the purpose of the policy. For example: `Prevent public repos on production`.
45+
46+
### Enforcement status
47+
48+
{% data reusables.enterprise.repo-policy-rules-enforcement %}
49+
50+
### Allow list
51+
52+
{% data reusables.enterprise.repo-policy-rules-allow-list %}
53+
54+
### Targets
55+
56+
Choose which repositories in the organization the policy applies to. You can select all repositories, choose a selection of existing repositories, or create a dynamic rule by name or custom property for current and future repositories.
57+
58+
If you set a dynamic list by name, you'll add one or more naming patterns using `fnmatch` syntax.
59+
* For example, the string `*open-source` would match any repository with a name that ends with `open-source`. For syntax details, see "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository#using-fnmatch-syntax)."
60+
* Optionally, you can prevent anyone outside the allow list from renaming the selected repositories. Alternatively, you can control the format of names in the "Policies" section.
61+
62+
### Policies
63+
64+
{% data reusables.enterprise.repo-policy-rules-policies-section %}

content/organizations/managing-organization-settings/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ children:
1616
- /verifying-or-approving-a-domain-for-your-organization
1717
- /renaming-an-organization
1818
- /transferring-organization-ownership
19+
- /governing-how-people-use-repositories-in-your-organization
1920
- /restricting-repository-creation-in-your-organization
2021
- /setting-permissions-for-deleting-or-transferring-repositories
2122
- /restricting-repository-visibility-changes-in-your-organization

content/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@ shortTitle: Custom properties
1313

1414
Custom properties allow you to decorate your repositories with information such as compliance frameworks, data sensitivity, or project details. Custom properties are private and can only be viewed by people with read permissions to the repository.
1515

16+
An organization can have up to 100 property definitions. An allowed value list can have up to 200 items.
17+
1618
{% ifversion ghec or ghes %}
1719
You can use repository properties to determine which repositories to target with a ruleset. For more information, see "[AUTOTITLE](/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization#targeting-repositories-by-properties-in-your-organization)."
1820
{% endif %}
1921

20-
## Allowed characters
22+
{% ifversion ghec %}
23+
You can define custom properties at the enterprise level to create a consistent experience across organizations. See "[AUTOTITLE](/admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/managing-custom-properties-for-repositories-in-your-enterprise)".
24+
{% endif %}
2125

22-
Custom property names and values may only contain certain characters:
26+
## Allowed characters
2327

24-
* Names: `a-z`, `A-Z`, `0-9`, `_`, `-`, `$`, `#`.
25-
* Values: All printable ASCII characters except `"`.
28+
{% data reusables.repositories.custom-property-allowed-characters %}
2629

2730
## Adding custom properties
2831

@@ -36,7 +39,7 @@ You can add custom properties to your organization and set values for those prop
3639
1. To add a new custom property, click **New property** in the upper right corner.
3740
1. In the "Name" field, type the name you'd like to use for your custom property. The name can't contain spaces.
3841
1. Optionally, in the "Description" field, fill in a description of your custom property.
39-
1. Under "Type", select the type of property you'd like to add. This can either be a text string, a single select field, a multi select field, or a true/false boolean.
42+
1. Under "Type", select the type of property you'd like to add. This can either be a text string{% ifversion ghes < 3.15 %} or a single select field{% else %}, a single select field, a multi select field, or a true/false boolean{% endif %}.
4043
1. Optionally, you can select **Allow repository actors to set this property**. When enabled, repository users and apps with the repository-level "custom properties" fine-grained permission will be able to set and update the property value for their repository.
4144
1. Optionally, you can select **Require this property for all repositories** and add a default value. This means that you require that all repositories in your organization have a value for this property. Repositories that don’t have an explicit value for this property will inherit the default value.
4245
1. Click **Save property**.

content/organizations/managing-organization-settings/restricting-repository-creation-in-your-organization.md

+14
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ topics:
1414
shortTitle: Restrict repository creation
1515
---
1616

17+
{% ifversion repo-policy-rules %}
18+
19+
## Setting a blanket policy
20+
21+
{% endif %}
22+
1723
You can choose whether members and {% data variables.product.prodname_github_apps %} can create repositories in your organization. {% ifversion ghec or ghes %}If you allow members and {% data variables.product.prodname_github_apps %} to create repositories, you can choose which types of repositories they can create.{% elsif fpt %}If you allow members and {% data variables.product.prodname_github_apps %} to create repositories, you can choose whether they can create both public and private repositories or public repositories only.{% endif %} Organization owners can always create any type of repository.
1824

1925
{% ifversion fpt %}
@@ -42,3 +48,11 @@ Organization owners can restrict the type of repositories members can create to
4248
{%- endif %}
4349

4450
1. Click **Save**.
51+
52+
{% ifversion repo-policy-rules %}
53+
54+
## Setting a more flexible policy ({% data variables.release-phases.public_preview %})
55+
56+
{% data reusables.enterprise.repo-policy-rules-more-flexible %}
57+
58+
{% endif %}

0 commit comments

Comments
 (0)