Skip to main content

此版本的 GitHub Enterprise Server 将于以下日期停止服务 2026-03-17. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Custom properties

Custom properties allow you to add structured metadata to repositories and organizations, enabling better organization, governance, and automation across your GitHub environment.

谁可以使用此功能?

Repository custom properties can be managed by organization owners and users with admin permissions to the repository. Organization custom properties can be managed by enterprise owners and users with the "Manage the Enterprise's custom properties definitions" permission.

What are custom properties?

Custom properties are structured metadata fields that you can attach to repositories or organizations in 你的 GitHub Enterprise Server 实例. They allow you to decorate your repositories or organizations with information such as compliance frameworks, data sensitivity, or project details.

An enterprise can have up to 100 property definitions. An allowed value list can have up to 200 items.

There are two types of custom properties:

  • Repository custom properties: Metadata attached to individual repositories.
  • Organization custom properties: Metadata attached to organizations within an enterprise.

注意

Organization custom properties are in public preview and subject to change. For GitHub Enterprise Server, this feature will only be available from version 3.22.

What are the benefits of using custom properties?

As well as providing improved discovery, automated workflows, compliance tracking, targeted policy enforcement, and better reporting capabilities, custom properties enable powerful governance through ruleset integration.

Both repository and organization custom properties can be used as targeting criteria for rulesets, enabling fine-grained policy enforcement based on metadata.

How do I add and manage custom properties?

You can add custom properties through GitHub's UI. See 管理组织中存储库的自定义属性 and Managing custom properties for organizations.