This gist and all the files it contains is under MIT licens.
NOTE: Run under PowerShell Core. In a recent change to the module PSGitHUb, it no longer works under Windows PowerShell.
- Install the module from PowerShell Gallery
Install-Module -Name PSGitHub
(Project site: https://github.com/pcgeek86/PSGitHub). - Run
Import-Module -Name PSGitHub
. - Run the following to set the GitHub token (create it in your account on GitHub).
# Token parameter is used on all the PSGitHub cmdlets. Token is a secure string. $PSDefaultParameterValues = @{ "*-GitHub*:Token" = ("<personal_access_token>" | ConvertTo-SecureString -AsPlainText -Force) }
- Open the script 'DscCommunity-Labels.ps1' and update the information under all the 'TODO:' markers.
- Run the script 'DscCommunity-Labels.ps1'. To verify what will happen, start
by running the script with
-WhatIf
, i.e..\DscCommunity-Labels.ps1 -WhatIf -Verbose
. Use the parameter-Confirm:$false
to override the confirm dialogs. - Clear the token from $PSDefaultParameterValues by closing the session or
running:
$PSDefaultParameterValues.Remove('*-GitHub*:Token')
WARNING: When you remove a label it will also be remove from all issues and pull requests. Make sure that it is not used any longer.