文章版本: Enterprise Server 2.17
Creating a default community health file
You can create default community health files, such as CONTRIBUTING and CODE_OF_CONDUCT. Default files will be used for any public repository owned by the account that does not contain its own file of that type.
关于默认社区健康文件
You can add default community health files to the root of a public repository called .github
that is owned by an organization.
GitHub Enterprise will use and display default files for any public repository owned by the account that does not have its own file of that type in any of the following places:
- 仓库的根目录
.github
文件夹docs
文件夹
例如,在不含自有 CONTRIBUTING 文件的公共仓库中创建议题或拉取请求的人将会看到指向默认 CONTRIBUTING 文件的链接。 If a repository has any files in its own .github/ISSUE_TEMPLATE
folder none of the contents of the default .github/ISSUE_TEMPLATE
folder will be used.
默认文件不包含在各个仓库的克隆、包或下载中,因为它们只存储在 .github
仓库中。
支持的文件类型
You can create defaults in your organization for the following community health files:
Community health file | 描述 |
---|---|
CONTRIBUTING.md | A CONTRIBUTING file communicates how people should contribute to your project. For more information, see "Setting guidelines for repository contributors." |
Issue and pull request templates | Issue and pull request templates customize and standardize the information you'd like contributors to include when they open issues and pull requests in your repository. For more information, see "About issue and pull request templates." |
SUPPORT.md | A SUPPORT file lets people know about ways to get help with your project. 更多信息请参阅“为项目添加支持资源”。 |
You cannot create a default license file. 必须将许可文件添加到各个仓库中,以便在克隆、打包或下载项目时包含该文件。
创建用于默认文件的仓库
- 在任何页面的右上角,使用 下拉菜单选择 New repository(新建仓库)。
- Use the Owner drop-down menu, and select the organization you want to create default files for.
- 键入 .github 作为仓库的名称,可选择键入说明。
- 选择让仓库公开。
- 选择 Initialize this repository with a README(使用自述文件初始化此仓库)。
- 单击 Create repository(创建仓库)。
- 在仓库中,创建一个受支持的社区健康文件。 Issue templates must be in a folder called
.github/ISSUE_TEMPLATE
. 所有其他支持的文件必须在仓库的根目录中。 更多信息请参阅“创建新文件”。