Get-GitHubLicense¶
SYNOPSIS¶
Get a license template, list of all popular license templates or a license for a repository
SYNTAX¶
List (Default)¶
Get-GitHubLicense [-Anonymous] [-Context <Object>] [<CommonParameters>]
Repository¶
Get-GitHubLicense [-Owner <string>] [-Repository <string>] [-Anonymous] [-Context <Object>]
[<CommonParameters>]
Name¶
Get-GitHubLicense [-Name <string>] [-Anonymous] [-Context <Object>] [<CommonParameters>]
ALIASES¶
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION¶
If no parameters are specified, the function will return a list of all license templates. If the Name parameter is specified, the function will return the license template for the specified name. If the Owner and Repo parameters are specified, the function will return the license for the specified repository.
EXAMPLES¶
EXAMPLE 1¶
Get-GitHubLicense
Get all license templates
EXAMPLE 2¶
Get-GitHubLicense -Name mit
Get the mit license template
EXAMPLE 3¶
Get-GitHubLicense -Owner 'octocat' -Repository 'Hello-World'
Get the license for the Hello-World repository from the octocat account.
PARAMETERS¶
-Anonymous¶
If specified, makes an anonymous request to the GitHub API without authentication.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Context¶
The context to run the command in. Used to get the details for the API call. Can be either a string or a GitHubContext object.
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Name¶
The license keyword, license name, or license SPDX ID. For example, mit or mpl-2.0.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Name
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Owner¶
The account owner of the repository. The name is not case sensitive.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Repository
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Repository¶
The name of the repository without the .git extension. The name is not case sensitive.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Repository
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS¶
OUTPUTS¶
NOTES¶
Get a license Get all commonly used licenses Get the license for a repository