-
Notifications
You must be signed in to change notification settings - Fork 60.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35550 from github/repo-sync
Repo sync
- Loading branch information
Showing
27 changed files
with
312 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...-in-your-enterprise/governing-how-people-use-repositories-in-your-enterprise.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
title: Governing how people use repositories in your enterprise | ||
intro: "Create a repository policy to control who can do things like create and delete repositories." | ||
permissions: Enterprise owners | ||
versions: | ||
feature: repo-policy-rules | ||
type: how_to | ||
topics: | ||
- Enterprise | ||
- Repositories | ||
shortTitle: Govern repository usage | ||
--- | ||
|
||
{% data reusables.enterprise.repo-policy-rules-preview %} | ||
|
||
{% data reusables.enterprise.repo-policy-rules-intro %} | ||
|
||
>[!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)." | ||
## Examples | ||
|
||
{% data reusables.enterprise.repo-policy-rules-examples %} | ||
|
||
## How will I target repositories? | ||
|
||
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. | ||
|
||
Then, you'll target repositories in the selected organizations. {% data reusables.enterprise.repo-policy-rules-with-custom-properties %} | ||
|
||
## Interaction with other policies | ||
|
||
{% data reusables.enterprise.repo-policy-rules-with-existing-policies %} | ||
* They're visible to organization owners, so there is more transparency around what is permitted. | ||
* They allow you to target repositories owned by {% data variables.product.prodname_emus %}. | ||
|
||
## Creating a repository policy | ||
|
||
{% data reusables.enterprise-accounts.access-enterprise %} | ||
{% data reusables.enterprise-accounts.policies-tab %} | ||
1. Under "Policies", click **Repository**. | ||
1. Click **New policy**. | ||
1. Configure your new policy, then click **Create**. For help, consult the following subsections. | ||
|
||
### Policy name | ||
|
||
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`. | ||
|
||
### Enforcement status | ||
|
||
{% data reusables.enterprise.repo-policy-rules-enforcement %} | ||
|
||
### Allow list | ||
|
||
{% data reusables.enterprise.repo-policy-rules-allow-list %} | ||
|
||
### Targets | ||
|
||
Choose which organizations and repositories the policy applies to. | ||
|
||
#### Target organizations | ||
|
||
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. | ||
|
||
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)." | ||
|
||
#### Target repositories | ||
|
||
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. | ||
|
||
### Policies | ||
|
||
{% data reusables.enterprise.repo-policy-rules-policies-section %} | ||
|
||
## Further reading | ||
|
||
To set additional policies for repository management, see "[AUTOTITLE](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ur-enterprise/managing-custom-properties-for-repositories-in-your-enterprise.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Managing custom properties for repositories in your enterprise | ||
intro: 'Create custom properties to give organizations a consistent way to categorize repositories.' | ||
permissions: Enterprise owners | ||
versions: | ||
ghec: '*' | ||
topics: | ||
- Repositories | ||
shortTitle: Custom properties | ||
--- | ||
|
||
> [!NOTE] Custom properties for your enterprise are in {% data variables.release-phases.public_preview %} and subject to change. | ||
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. | ||
|
||
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)." | ||
|
||
## Allowed characters | ||
|
||
{% data reusables.repositories.custom-property-allowed-characters %} | ||
|
||
## Who can set and view values for custom properties I define? | ||
|
||
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)." | ||
|
||
* As an enterprise owner, you can set a default value for required properties. | ||
* Organization owners can set values in their organization, either across repositories or at the repository level. | ||
* If enabled, people with repository access, or the `custom properties` fine-grained permission, can set and update the property value for their repository. | ||
|
||
People with read permissions to a repository can view the custom property values for that repository. | ||
|
||
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)." | ||
|
||
## Adding custom properties | ||
|
||
You can add custom properties to your enterprise to make those properties available in all of your orgaizations. | ||
|
||
{% data reusables.enterprise-accounts.access-enterprise %} | ||
1. In the left sidebar, under "Policies", click **Custom properties**. | ||
1. To add a new custom property, in the upper-right corner, click **New property**. | ||
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. | ||
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. | ||
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. | ||
1. Click **Save property**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...nization-settings/governing-how-people-use-repositories-in-your-organization.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: Governing how people use repositories in your organization | ||
intro: "Create a repository policy to control who can do things like create and delete repositories." | ||
permissions: Organization owners | ||
versions: | ||
feature: repo-policy-rules | ||
type: how_to | ||
topics: | ||
- Repositories | ||
shortTitle: Govern repository usage | ||
--- | ||
|
||
{% data reusables.enterprise.repo-policy-rules-preview %} | ||
|
||
{% data reusables.enterprise.repo-policy-rules-intro %} | ||
|
||
>[!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)." | ||
## Examples | ||
|
||
{% data reusables.enterprise.repo-policy-rules-examples %} | ||
|
||
## How will I target repositories? | ||
|
||
{% data reusables.enterprise.repo-policy-rules-with-custom-properties %} | ||
|
||
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. | ||
|
||
## Interaction with other policies | ||
|
||
{% data reusables.enterprise.repo-policy-rules-with-existing-policies %} | ||
|
||
## Creating a repository policy | ||
|
||
{% data reusables.profile.access_org %} | ||
{% data reusables.profile.org_settings %} | ||
1. On the left side of the page, in the sidebar, click **{% octicon "law" aria-hidden="true" %} Policies**. | ||
1. Under "Policies", click **Repository**. | ||
1. Click **New policy**. | ||
1. Configure your new policy, then click **Create**. For help, consult the following subsections. | ||
|
||
### Policy name | ||
|
||
Use something descriptive to communicate the purpose of the policy. For example: `Prevent public repos on production`. | ||
|
||
### Enforcement status | ||
|
||
{% data reusables.enterprise.repo-policy-rules-enforcement %} | ||
|
||
### Allow list | ||
|
||
{% data reusables.enterprise.repo-policy-rules-allow-list %} | ||
|
||
### Targets | ||
|
||
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. | ||
|
||
If you set a dynamic list by name, you'll add one or more naming patterns using `fnmatch` syntax. | ||
* 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)." | ||
* 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. | ||
|
||
### Policies | ||
|
||
{% data reusables.enterprise.repo-policy-rules-policies-section %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.