Skip to content

Commit 210f721

Browse files
committed
Enhancement (releases): Add parameters for Edit-GitHubRepositoryRelease
1 parent 4c56cfc commit 210f721

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/PSGitHubRestApi/Public/Edit-GitHubRepositoryRelease.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ function Edit-GitHubRepositoryRelease {
4040
[Parameter(Mandatory=$false)]
4141
[ValidateNotNullOrEmpty()]
4242
[bool]$Prerelease
43+
,
44+
[Parameter(Mandatory=$false)]
45+
[ValidateSet(
46+
"True",
47+
"False",
48+
"Legacy"
49+
)]
50+
[string]$MakeLatest
51+
,
52+
[Parameter(Mandatory=$false)]
53+
[ValidateNotNullOrEmpty()]
54+
[string]$DiscussionCategoryName
4355
)
4456

4557
begin {
@@ -59,6 +71,8 @@ function Edit-GitHubRepositoryRelease {
5971
if ($Body) { $_body['body'] = $Body }
6072
if ($null -ne $Draft) { $_body['draft'] = $Draft }
6173
if ($null -ne $Prerelease) { $_body['prerelease'] = $Prerelease }
74+
if ($DiscussionCategoryName) { $_body['discussion_category_name'] = $DiscussionCategoryName }
75+
if ($MakeLatest) { $_body['make_latest'] = $MakeLatest }
6276
$_bodyJson = $_body | ConvertTo-Json -Depth 100
6377
"Uri: '$_uri'" | Write-Verbose
6478
"Headers:" | Write-Verbose

0 commit comments

Comments
 (0)