Get-GitHubLicense¶
SYNOPSIS¶
Get a license template, list of all popular license templates or a license for a repository
SYNTAX¶
List (Default)¶
Get-GitHubLicense [-Context <Object>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Repository¶
Get-GitHubLicense [-Owner <String>] [-Repo <String>] [-Context <Object>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Name¶
Get-GitHubLicense [-Name <String>] [-Context <Object>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
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' -Repo 'Hello-World'
Get the license for the Hello-World repository from the octocat account.
PARAMETERS¶
-Owner¶
The account owner of the repository. The name is not case sensitive.
Type: String
Parameter Sets: Repository
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Repo¶
The name of the repository without the .git extension. The name is not case sensitive.
Type: String
Parameter Sets: Repository
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name¶
The license keyword, license name, or license SPDX ID. For example, mit or mpl-2.0.
Type: String
Parameter Sets: Name
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-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: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-GitHubContext)
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction¶
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -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