This is a collection of notes for how I manage multiple Github repositories. All repositories under my account, are managed this way.
Features
I need the following:
- Standardize repositories - when I want to push new topics, change the wording of descriptions, use new settings or disable others - I want to be able to do this for all repos now, and in the future
- Streamline Github Actions - I want to be able to publish nuget packages from all repositories, perform builds, have PR's checked and so on - in the same way. If I discover something new and exciting, I want to be able to use it on all repos in an easy manner
- Streamline repository contents - I want to use Sourcelink, xmldocs, and other fancy features in my projects - and when I discover new ones, I want to be able to use them in a general fashion.
In short, I want to template my repositories, but be able to update these templates as I go along.
Parts
This guide is split into parts, for each area. Parts:
Specification
All good things start with a specification. I've created a file, which I'll call repos.json, which will contain all the settings I want for all my repositories. It looks like this:
{
"content": {
"standardContent": {
".gitignore": "standard_content\\.gitignore"
},
"standardDotnetNuget": {
".github/workflows/dotnet.yml": "standard_content\\dotnet.yml",
".github/workflows/nuget.yml": "standard_content\\nuget.yml",
"Directory.Build.props": "standard_content\\Directory.Build.props"
},
...
},
"repositories": {
"MBW.BlueRiiot2MQTT": {
"description": "Utility to map between Blue Riiots pool API, and Home Assistant MQTT",
"topics": [ "hass", "home-assistant", "mqtt", "blue-riiot", "pool" ],
"docker": true,
"nuget": false,
"standardContent": true
},
"TMDbLib": {
"description": "C#.Net library for TheMovieDB",
"topics": [ "tmdb", "movies", "themoviedb" ],
"has_wiki": true,
"standardContent": true,
"standardDotnetNuget": true
},
...
}
}
The file describes the name, description, topics and some custom properties I want going for all repositories. The settings like standardContent are something I've made up, and will be using in the post on managing content.