Skip to content
PowerShell script for automated repository creation and initialization
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
NOTICE
README.md

README.md

PS.GitHub.RepoCreator

License

PowerShell script for automated repository creation and initialization

How to use

  1. Create an access token for command-line use (For details see here)
    1. Necessary scopes
      • repo
      • write:org (For creation of repos for an organization)
  2. Check out the sources from the PS.GitHub.RepoCreator repository
  3. Navigate to the src folder
    1. Config.xml: Fill in your GitHub username and the access token generated in step 1
    2. NOTICE_Template: Adjust the content according your wishes (IMPORTANT: The placeholders REPONAME and REPODESCRIPTION always have to occur at least once in the file)
    3. README_Template: Adjust the content according your wishes (IMPORTANT: The placeholders REPONAME, LICENSESHIELD, NUGETVERSIONSHIELD and REPODESCRIPTION always have to occur at least once in the file)
  4. Now you're ready to execute the script which will do the following
    1. Creation of a new repository with the selected license and the selected gitignore file
    2. In case you selected Apache 2.0 as license, it will add a license badge to the README file
    3. Creation of a NOTICE file based on the NOTICE_Template
    4. Creation of 3 new issue labels: feature, onhold, task

Sample invocation

PS C:\PS.GitHub.RepoCreator\src> .\New-GitHubRepo.ps1 -RepoName 'NAME' -RepoDescription 'DESCRIPTION'

Config.xml

<?xml version="1.0"?>
<Configuration>
	<GitHub>
		<Username>USERNAME</Username>
		<Token>TOKEN</Token>
	</GitHub>
</Configuration>
You can’t perform that action at this time.