Skip to content

New-GitHubReleaseNote

SYNOPSIS

Generate release notes content for a release.

SYNTAX

New-GitHubReleaseNote [-Owner] <String> [-Repository] <String> [-Tag] <String> [[-Target] <String>]
 [[-PreviousTag] <String>] [[-ConfigurationFilePath] <String>] [[-Context] <Object>]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Generate a name and body describing a release. The body content will be Markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release.

EXAMPLES

EXAMPLE 1

$params = @{
    Owner = 'octocat'
    Repository = 'hello-world'
    Tag = 'v1.0.0'
}
New-GitHubReleaseNote @params

Creates a new release notes draft for the repository 'hello-world' owned by 'octocat' with the tag name 'v1.0.0'. In this example the tag 'v1.0.0' has to exist in the repository. The configuration file '.github/release.yml' or '.github/release.yaml' will be used.

EXAMPLE 2

$params = @{
    Owner = 'octocat'
    Repository = 'hello-world'
    Tag = 'v1.0.0'
    Target = 'main'
}
New-GitHubReleaseNote @params

Creates a new release notes draft for the repository 'hello-world' owned by 'octocat' with the tag name 'v1.0.0'. In this example the tag 'v1.0.0' has to exist in the repository.

EXAMPLE 3

$params = @{
    Owner = 'octocat'
    Repository = 'hello-world'
    Tag = 'v1.0.0'
    Target = 'main'
    PreviousTag = 'v0.9.2'
    ConfigurationFilePath = '.github/custom_release_config.yml'
}
New-GitHubReleaseNote @params

Creates a new release notes draft for the repository 'hello-world' owned by 'octocat' with the tag name 'v1.0.0'. The release notes will be based on the changes between the tags 'v0.9.2' and 'v1.0.0' and generated based on the configuration file located in the repository at '.github/custom_release_config.yml'.

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: 1
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: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tag

The tag name for the release. This can be an existing tag or a new one.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Target

Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreviousTag

The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConfigurationFilePath

Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
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: 7
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

OUTPUTS

pscustomobject

NOTES

The returned object contains the following properties: - Name: The name of the release. - Notes: The body of the release notes.

https://psmodule.io/GitHub/Functions/Releases/New-GitHubReleaseNote/

[Generate release notes content for a release](https://docs.github.com/rest/releases/releases#generate-release-notes-content-for-a-release)