Skip to content

Tool to streamline content of Github repositories from a general spec

Notifications You must be signed in to change notification settings

LordMike/MBW.Tools.GhStandardContent

Repository files navigation

MBW.Tools.GhStandardContent Generic Build NuGet GHPackages

Tool to streamline content in a Github repository from a spec.

This is part of a blog post on how to administer multiple Github repositories.

Installation

Run dotnet tool install -g MBW.Tools.GhStandardContent. After this, gh-standard-content should be in your PATH.

Usage

Read more on the blog post about managing standardized content on Github repositories. In short, you need a Github token and a repos.json file which describes your content.

Create a repos.json with the following:

{
  "content": {
    // Define as many sets of files as you want
    "standardContent": {
      ".gitignore": "standard_content\\.gitignore"
    },
    // Each set can describe multiple files, and where they're located locally
    "standardDotnetNuget": {
      // To modify workflow files, you need a special scope: workflow
      ".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": {
    // Describe each repository, with a property indicating that a set applies.
    "LordMike/MBW.Client.BlueRiiotApi": {
      "standardContent": true,
      "standardDotnetNuget": true
    },
    ...
  }
}

Run the tool with gh-standard-content -t My_Token repos.json to create pull requests on all repositories that are out of date.

Other options

Run gh-standard-content --help for more parameters.

About

Tool to streamline content of Github repositories from a general spec

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages