Skip to content

samsmithnz/RepoAutomation

Repository files navigation

Repo Automation

CI/ CD Coverage Status Code Smells Latest NuGet package Current Release

.NET code to create and configure a repo with C#. I'm in GitHub everyday. There are certain activities I found myself manually doing on a regular basis. Not super long activities, but boring, repetitive activities - the types of activities that are perfect for automation. Hence this project:

Usage

RepoAutomation [-o|--owner <GITHUB-OWNER/ACCOUNT>] 
               [-r|--repo <REPOSITORY-NAME>] 
               [-d|--directory <WORKING-DIRECTORY>] 
               [-v|--visibility <REPO-VISIBILITY>]
               [-p|--projectTypes <.NET-COMMA-DELIMITED-PROJECTS]

Requires a Fine-Grained PAT token to be setup, with:

  • Actions: Read-only (can view workflows and actions, but cannot modify or trigger them)
  • Administration: Read and write (can view and perform admin tasks on repositories)
  • Code scanning alerts: Read-only (can view code scanning alerts, but cannot resolve or dismiss them)
  • Contents: Read (can view repository contents, but cannot modify them)
  • Dependabot alerts: Read (can view Dependabot alerts)
  • Deployments: Read (can view deployment statuses)
  • Metadata: Read (can view repository metadata)
  • Pull Requests: Read and write (can view, create, update, and merge pull requests)
  • Repository security advisories: Read (can view security advisories for repos)
  • Secret Scanning alerts: Read (can view secret scanning alerts)

Example

Using default settings to create a new repository "RepoAutomationTest", with a .NET 6 class library and unit tests project:

RepoAutomation --owner samsmithnz --repo RepoAutomationTest --directory c:\users\sam\source\repos --visibility public --projectTypes classlib,mstest

image

Here is the result: image

Website

For governance, we are building a website to monitor repos and take corrective action:

image

About

.NET code to create, configure, and provide governance to repos with .NET

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages