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.
Allowed characters
사용자 지정 속성 이름 및 값은 특정 문자만 포함할 수 있습니다.
- 이름:
a-z,A-Z,0-9,_,-,$,#. - 값:
"를 제외한 인쇄 가능한 모든 ASCII 문자.
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 조직의 리포지토리에 대한 사용자 지정 속성 관리.
- 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 propertiesfine-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 조직의 리포지토리에 대한 사용자 지정 속성 관리.
Adding custom properties
You can add custom properties to your enterprise to make those properties available in all of your organizations.
- GitHub의 오른쪽 위 모서리에서 프로필 사진을 클릭합니다.
- 사용자 환경에 따라 사용자 엔터프라이즈를 클릭하거나 사용자 엔터프라이즈를 클릭한 다음, 보고 싶은 엔터프라이즈를 클릭합니다.
- In the left sidebar, under "Policies", click Custom properties.
- To add a new custom property, in the upper-right corner, click New property.
- Enter a name, description, and type for the custom property. The name must be unique across all of your organizations, and cannot contain spaces.
- Optionally, select Allow repository actors to set this property. When enabled, repository users and apps with the repository-level
custom propertiesfine-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. - 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.
- Click Save property.
Next steps
Apply policies to repositories based on their custom properties. See Defining policies for repositories in your enterprise.