Update-GitHubRelease¶
SYNOPSIS¶
Update a release
SYNTAX¶
Not latest (Default)¶
Update-GitHubRelease -Owner <String> -Repository <String> [-ID <String>] [-Tag <String>] [-Target <String>]
[-Name <String>] [-Notes <String>] [-Draft] [-Prerelease] [-DiscussionCategoryName <String>]
[-GenerateReleaseNotes] [-Declare] [-ReleaseObject <GitHubRelease>] [-Context <Object>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set latest¶
Update-GitHubRelease -Owner <String> -Repository <String> [-ID <String>] [-Tag <String>] [-Target <String>]
[-Name <String>] [-Notes <String>] [-DiscussionCategoryName <String>] [-GenerateReleaseNotes] [-Latest]
[-Declare] [-ReleaseObject <GitHubRelease>] [-Context <Object>] [-ProgressAction <ActionPreference>] [-WhatIf]
[-Confirm] [<CommonParameters>]
DESCRIPTION¶
Users with push access to the repository can edit a release.
You must specify either the ID or Tag parameter to identify the release to update. The function also accepts GitHubRelease objects through the pipeline.
EXAMPLES¶
EXAMPLE 1¶
Update-GitHubRelease -Owner 'octocat' -Repository 'hello-world' -ID '1234567' -Notes 'Release notes'
Updates the release with the ID '1234567' for the repository 'octocat/hello-world' with the note 'Release notes'.
EXAMPLE 2¶
Update-GitHubRelease -Owner 'octocat' -Repository 'hello-world' -Tag 'v1.0' -Name 'Release v1.0' -Notes 'Stable release'
Updates the release with the tag 'v1.0' for the repository 'octocat/hello-world' with a new name and notes.
EXAMPLE 3¶
Get-GitHubRelease -Owner 'octocat' -Repository 'hello-world' -Tag 'v1.0' |
Update-GitHubRelease -Draft:$false -Prerelease
Gets a release by tag and updates it to be a prerelease (not a draft).
EXAMPLE 4¶
Update-GitHubRelease -Owner 'octocat' -Repository 'hello-world' -Tag 'v1.0' -Latest -GenerateReleaseNotes
Updates the release with tag 'v1.0' to be the latest release and automatically generates release notes.
PARAMETERS¶
-Owner¶
The account owner of the repository. The name is not case sensitive.
Type: String
Parameter Sets: (All)
Aliases: Organization, User
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Repository¶
The name of the repository without the .git extension. The name is not case sensitive.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ID¶
The unique identifier of the release.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Tag¶
The name of the tag.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Target¶
Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. API Default: the repository's default branch.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name¶
The name of the release.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Notes¶
Text describing the contents of the tag.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Draft¶
Whether the release is a draft.
Type: SwitchParameter
Parameter Sets: Not latest
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Prerelease¶
Whether to identify the release as a prerelease.
Type: SwitchParameter
Parameter Sets: Not latest
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DiscussionCategoryName¶
If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see Managing categories for discussions in your repository.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-GenerateReleaseNotes¶
Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Latest¶
Specifies whether this release should be set as the latest release for the repository. If the release is a draft or a prerelease, setting this parameters will promote the release to a release, setting the draft and prerelease parameters to false.
Type: SwitchParameter
Parameter Sets: Set latest
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Declare¶
Takes all parameters and updates the release with the provided AND the default values of the non-provided parameters. Used for Set-GitHubRelease.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ReleaseObject¶
The release to update
Type: GitHubRelease
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
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
-WhatIf¶
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm¶
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
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¶
GitHubRelease¶
OUTPUTS¶
GitHubRelease¶
NOTES¶
RELATED LINKS¶
https://psmodule.io/GitHub/Functions/Releases/Update-GitHubRelease