Home > Enterprise >  What is `.github/CONTRIBUTING.md` for?
What is `.github/CONTRIBUTING.md` for?

Time:07-14

I found some repositories on GitHub that have a dot-folder .github and a file CONTRIBUTING.md in it.

Usually I knew md-files in the repositories root folder but not in a dot-sub-folder.

What is this file for? Is it linked somewhere in the GitHub web-frontend?

CodePudding user response:

That comes from 2012 "enter image description here

Since then, it is documented in "Setting guidelines for repository contributors"

It includes:

To help your project contributors do good work, you can add a file with contribution guidelines to your project repository's root, docs, or .github folder.

So this is a new alternative location for that file.

If a repository contains more than one CONTRIBUTING file, then the file shown in links is chosen from locations in the following order:

  • the .github directory, then
  • the repository's root directory, and finally
  • the docs directory.

From Feb. 2019

Organizations can now add community health files to a specially named .github repository to serve as organization-wide defaults for all repositories within their organization.

You can add CONTRIBUTING, SUPPORT, CODE_OF_CONDUCT, ISSUE_TEMPLATE(S), or PULL_REQUEST_TEMPLATE(S) files to a public, organization-owned .github repository, and if a given community health file doesn’t exist for a repository, the organization-wide default will be used.

While the file itself won’t appear in the file browser or Git history for each repository, it will be surfaced throughout developers’ workflows, such as when opening a new issue or when viewing the Community Profile, just as if it were committed to the repository directly.

  • Related