Home Back

Centralize your project health files for your GitHub repositories

eliostruyf.com 3 days ago

When you manage multiple repositories on GitHub, you can centralize your project health files like issue templates, pull request templates, code of conduct, and more. By centralizing those files, you can automatically reuse them across all your repositories or overwrite them when needed. You can achieve this by creating a special repository called .github.

info

You can read more about this feature in the Creating a default community health file documentation.

I had forgotten about this feature, but I was reminded of it when I was setting up a new repository and had to add my funding.yml file again.

Start by creating a .github repository

All you need to do is create a new repository on GitHub and name it .github. That’s it! GitHub will automatically recognize this repository as a special repository and use it to centralize your project health files.

Adding your Project Health Files

The supported file types section of the GitHub documentation lists the files you can centralize.

In my case, I have added my funding.yml file and CODE_OF_CONDUCT.md file to my .github repository. This way, I can easily reuse them in all of my repositories.

info

Check out my .github repository.

Here is an example from before I had a .github repository:

Show image Before the .github repository
Before the .github repository

And here you can see the new .github repository with the funding.yml and CODE_OF_CONDUCT.md files:

Show image After the .github repository is added
After the .github repository is added
People are also reading