From bf4a49045949b4f31ae246c64a55e3eee6afec0d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 14:14:42 +0200 Subject: [PATCH 01/11] =?UTF-8?q?=F0=9F=A9=B9=20[Enhancement]:=20Add=20opt?= =?UTF-8?q?ions=20to=20use=20PR=20body=20as=20release=20notes=20and=20PR?= =?UTF-8?q?=20title=20as=20release=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ action.yml | 10 ++++++++ scripts/main.ps1 | 59 ++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 67 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1e5fc55..1e18cf7 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ The action can be configured using the following settings: | `MajorLabels` | A comma separated list of labels that trigger a major release. | `major, breaking` | false | | `MinorLabels` | A comma separated list of labels that trigger a minor release. | `minor, feature` | false | | `PatchLabels` | A comma separated list of labels that trigger a patch release. | `patch, fix` | false | +| `UsePRBodyAsReleaseNotes` | When enabled, uses the pull request body as the release notes for the GitHub release. | `false` | false | +| `UsePRTitleAsReleaseName` | When enabled, uses the pull request title as the name for the GitHub release. | `false` | false | | `VersionPrefix` | The prefix to use for the version number. | `v` | false | | `WhatIf` | Control wether to simulate the action. If enabled, the action will not create any releases. Used for testing. | `false` | false | | `Debug` | Enable debug output. | `'false'` | false | diff --git a/action.yml b/action.yml index 2453f28..e3fb7dc 100644 --- a/action.yml +++ b/action.yml @@ -50,6 +50,14 @@ inputs: description: A comma separated list of labels that trigger a patch release. required: false default: patch, fix + UsePRBodyAsReleaseNotes: + description: When enabled, uses the pull request body as the release notes for the GitHub release. + required: false + default: 'false' + UsePRTitleAsReleaseName: + description: When enabled, uses the pull request title as the name for the GitHub release. + required: false + default: 'false' VersionPrefix: description: The prefix to use for the version number. required: false @@ -95,6 +103,8 @@ runs: PSMODULE_AUTO_RELEASE_INPUT_MajorLabels: ${{ inputs.MajorLabels }} PSMODULE_AUTO_RELEASE_INPUT_MinorLabels: ${{ inputs.MinorLabels }} PSMODULE_AUTO_RELEASE_INPUT_PatchLabels: ${{ inputs.PatchLabels }} + PSMODULE_AUTO_RELEASE_INPUT_UsePRBodyAsReleaseNotes: ${{ inputs.UsePRBodyAsReleaseNotes }} + PSMODULE_AUTO_RELEASE_INPUT_UsePRTitleAsReleaseName: ${{ inputs.UsePRTitleAsReleaseName }} PSMODULE_AUTO_RELEASE_INPUT_VersionPrefix: ${{ inputs.VersionPrefix }} PSMODULE_AUTO_RELEASE_INPUT_WhatIf: ${{ inputs.WhatIf }} with: diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7ce66ce..d72c36e 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -45,6 +45,8 @@ LogGroup 'Set configuration' { $createMinorTag = ![string]::IsNullOrEmpty($configuration.CreateMinorTag) ? $configuration.CreateMinorTag -eq 'true' : $env:PSMODULE_AUTO_RELEASE_INPUT_CreateMinorTag -eq 'true' $datePrereleaseFormat = ![string]::IsNullOrEmpty($configuration.DatePrereleaseFormat) ? $configuration.DatePrereleaseFormat : $env:PSMODULE_AUTO_RELEASE_INPUT_DatePrereleaseFormat $incrementalPrerelease = ![string]::IsNullOrEmpty($configuration.IncrementalPrerelease) ? $configuration.IncrementalPrerelease -eq 'true' : $env:PSMODULE_AUTO_RELEASE_INPUT_IncrementalPrerelease -eq 'true' + $usePRBodyAsReleaseNotes = ![string]::IsNullOrEmpty($configuration.UsePRBodyAsReleaseNotes) ? $configuration.UsePRBodyAsReleaseNotes -eq 'true' : $env:PSMODULE_AUTO_RELEASE_INPUT_UsePRBodyAsReleaseNotes -eq 'true' + $usePRTitleAsReleaseName = ![string]::IsNullOrEmpty($configuration.UsePRTitleAsReleaseName) ? $configuration.UsePRTitleAsReleaseName -eq 'true' : $env:PSMODULE_AUTO_RELEASE_INPUT_UsePRTitleAsReleaseName -eq 'true' $versionPrefix = ![string]::IsNullOrEmpty($configuration.VersionPrefix) ? $configuration.VersionPrefix : $env:PSMODULE_AUTO_RELEASE_INPUT_VersionPrefix $whatIf = ![string]::IsNullOrEmpty($configuration.WhatIf) ? $configuration.WhatIf -eq 'true' : $env:PSMODULE_AUTO_RELEASE_INPUT_WhatIf -eq 'true' @@ -60,6 +62,8 @@ LogGroup 'Set configuration' { Write-Output "Create minor tag enabled: [$createMinorTag]" Write-Output "Date-based prerelease format: [$datePrereleaseFormat]" Write-Output "Incremental prerelease enabled: [$incrementalPrerelease]" + Write-Output "Use PR body as release notes: [$usePRBodyAsReleaseNotes]" + Write-Output "Use PR title as release name: [$usePRTitleAsReleaseName]" Write-Output "Version prefix: [$versionPrefix]" Write-Output "What if mode: [$whatIf]" Write-Output '' @@ -226,10 +230,35 @@ if ($createPrerelease -or $createRelease -or $whatIf) { } } + # Build release creation command with options + $releaseCreateCommand = "gh release create $newVersion" + + # Add title parameter + if ($usePRTitleAsReleaseName) { + $prTitle = $pull_request.title + $releaseCreateCommand += " --title '$prTitle'" + Write-Output "Using PR title as release name: [$prTitle]" + } else { + $releaseCreateCommand += " --title $newVersion" + } + + # Add notes parameter + if ($usePRBodyAsReleaseNotes) { + $prBody = $pull_request.body + $releaseCreateCommand += " --notes '$prBody'" + Write-Output 'Using PR body as release notes' + } else { + $releaseCreateCommand += ' --generate-notes' + } + + # Add remaining parameters + $releaseCreateCommand += " --target $prHeadRef --prerelease" + if ($whatIf) { - Write-Output "WhatIf: gh release create $newVersion --title $newVersion --target $prHeadRef --generate-notes --prerelease" + Write-Output "WhatIf: $releaseCreateCommand" } else { - $releaseURL = gh release create $newVersion --title $newVersion --target $prHeadRef --generate-notes --prerelease + # Execute the command and capture the output + $releaseURL = & $releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE @@ -246,10 +275,32 @@ if ($createPrerelease -or $createRelease -or $whatIf) { } } } else { + # Build release creation command with options + $releaseCreateCommand = "gh release create $newVersion" + + # Add title parameter + if ($usePRTitleAsReleaseName) { + $prTitle = $pull_request.title + $releaseCreateCommand += " --title '$prTitle'" + Write-Output "Using PR title as release name: [$prTitle]" + } else { + $releaseCreateCommand += " --title $newVersion" + } + + # Add notes parameter + if ($usePRBodyAsReleaseNotes) { + $prBody = $pull_request.body + $releaseCreateCommand += " --notes '$prBody'" + Write-Output 'Using PR body as release notes' + } else { + $releaseCreateCommand += ' --generate-notes' + } + if ($whatIf) { - Write-Output "WhatIf: gh release create $newVersion --title $newVersion --generate-notes" + Write-Output "WhatIf: $releaseCreateCommand" } else { - gh release create $newVersion --title $newVersion --generate-notes + # Execute the command + & $releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE From 81ea04203a82689ef0e846c70018b4192791ea10 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 14:52:55 +0200 Subject: [PATCH 02/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20releas?= =?UTF-8?q?e=20command=20syntax=20to=20use=20'gh'=20prefix=20for=20consist?= =?UTF-8?q?ency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index d72c36e..7b2cc82 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -231,7 +231,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { } # Build release creation command with options - $releaseCreateCommand = "gh release create $newVersion" + $releaseCreateCommand = "release create $newVersion" # Add title parameter if ($usePRTitleAsReleaseName) { @@ -258,7 +258,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { Write-Output "WhatIf: $releaseCreateCommand" } else { # Execute the command and capture the output - $releaseURL = & $releaseCreateCommand + $releaseURL = gh $releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE @@ -276,7 +276,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { } } else { # Build release creation command with options - $releaseCreateCommand = "gh release create $newVersion" + $releaseCreateCommand = "release create $newVersion" # Add title parameter if ($usePRTitleAsReleaseName) { @@ -300,7 +300,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { Write-Output "WhatIf: $releaseCreateCommand" } else { # Execute the command - & $releaseCreateCommand + gh $releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE From ebd515511ffda26e4ae0f664bdc091d83f7601fb Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 14:59:23 +0200 Subject: [PATCH 03/11] =?UTF-8?q?=F0=9F=A9=B9=20[Refactor]:=20Update=20rel?= =?UTF-8?q?ease=20command=20construction=20to=20use=20array=20syntax=20for?= =?UTF-8?q?=20improved=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7b2cc82..7ef0860 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -231,34 +231,34 @@ if ($createPrerelease -or $createRelease -or $whatIf) { } # Build release creation command with options - $releaseCreateCommand = "release create $newVersion" + $releaseCreateCommand = @("gh", "release", "create", "$newVersion") # Add title parameter if ($usePRTitleAsReleaseName) { $prTitle = $pull_request.title - $releaseCreateCommand += " --title '$prTitle'" + $releaseCreateCommand += @(" --title", "'$prTitle'") Write-Output "Using PR title as release name: [$prTitle]" } else { - $releaseCreateCommand += " --title $newVersion" + $releaseCreateCommand += @(" --title", "$newVersion") } # Add notes parameter if ($usePRBodyAsReleaseNotes) { $prBody = $pull_request.body - $releaseCreateCommand += " --notes '$prBody'" + $releaseCreateCommand += @(" --notes", "'$prBody'") Write-Output 'Using PR body as release notes' } else { $releaseCreateCommand += ' --generate-notes' } # Add remaining parameters - $releaseCreateCommand += " --target $prHeadRef --prerelease" + $releaseCreateCommand += @("--target", $prHeadRef, "--prerelease") if ($whatIf) { Write-Output "WhatIf: $releaseCreateCommand" } else { # Execute the command and capture the output - $releaseURL = gh $releaseCreateCommand + $releaseURL = & $releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE @@ -276,31 +276,31 @@ if ($createPrerelease -or $createRelease -or $whatIf) { } } else { # Build release creation command with options - $releaseCreateCommand = "release create $newVersion" + $releaseCreateCommand = @("gh", "release", "create", "$newVersion") # Add title parameter if ($usePRTitleAsReleaseName) { $prTitle = $pull_request.title - $releaseCreateCommand += " --title '$prTitle'" + $releaseCreateCommand += @(" --title", "'$prTitle'") Write-Output "Using PR title as release name: [$prTitle]" } else { - $releaseCreateCommand += " --title $newVersion" + $releaseCreateCommand += @(" --title", "$newVersion") } # Add notes parameter if ($usePRBodyAsReleaseNotes) { $prBody = $pull_request.body - $releaseCreateCommand += " --notes '$prBody'" + $releaseCreateCommand += @(" --notes", "'$prBody'") Write-Output 'Using PR body as release notes' } else { - $releaseCreateCommand += ' --generate-notes' + $releaseCreateCommand += '--generate-notes' } if ($whatIf) { Write-Output "WhatIf: $releaseCreateCommand" } else { # Execute the command - gh $releaseCreateCommand + & $releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE From e0b47299e0e2891a1c6e47849b224183ba061f09 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 15:04:12 +0200 Subject: [PATCH 04/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20releas?= =?UTF-8?q?e=20command=20to=20use=20consistent=20syntax=20for=20title=20an?= =?UTF-8?q?d=20notes=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7ef0860..6891a5a 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -281,16 +281,16 @@ if ($createPrerelease -or $createRelease -or $whatIf) { # Add title parameter if ($usePRTitleAsReleaseName) { $prTitle = $pull_request.title - $releaseCreateCommand += @(" --title", "'$prTitle'") + $releaseCreateCommand += @("--title", "$prTitle") Write-Output "Using PR title as release name: [$prTitle]" } else { - $releaseCreateCommand += @(" --title", "$newVersion") + $releaseCreateCommand += @("--title", "$newVersion") } # Add notes parameter if ($usePRBodyAsReleaseNotes) { $prBody = $pull_request.body - $releaseCreateCommand += @(" --notes", "'$prBody'") + $releaseCreateCommand += @("--notes", "$prBody") Write-Output 'Using PR body as release notes' } else { $releaseCreateCommand += '--generate-notes' From a2970296f7772a2183af0b7ed3789b5396a0860b Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 15:05:07 +0200 Subject: [PATCH 05/11] =?UTF-8?q?=F0=9F=A9=B9=20[Refactor]:=20Simplify=20r?= =?UTF-8?q?elease=20command=20parameter=20syntax=20for=20title=20and=20not?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 6891a5a..a81c553 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -236,19 +236,19 @@ if ($createPrerelease -or $createRelease -or $whatIf) { # Add title parameter if ($usePRTitleAsReleaseName) { $prTitle = $pull_request.title - $releaseCreateCommand += @(" --title", "'$prTitle'") + $releaseCreateCommand += @("--title", "$prTitle") Write-Output "Using PR title as release name: [$prTitle]" } else { - $releaseCreateCommand += @(" --title", "$newVersion") + $releaseCreateCommand += @("--title", "$newVersion") } # Add notes parameter if ($usePRBodyAsReleaseNotes) { $prBody = $pull_request.body - $releaseCreateCommand += @(" --notes", "'$prBody'") + $releaseCreateCommand += @("--notes", "$prBody") Write-Output 'Using PR body as release notes' } else { - $releaseCreateCommand += ' --generate-notes' + $releaseCreateCommand += '--generate-notes' } # Add remaining parameters From f7371bd88b3cbaa64316b4abd70e98cf7b1024d8 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 15:11:14 +0200 Subject: [PATCH 06/11] =?UTF-8?q?=F0=9F=A9=B9=20[Refactor]:=20Replace=20co?= =?UTF-8?q?mmand=20execution=20with=20Start-Process=20for=20improved=20pro?= =?UTF-8?q?cess=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index a81c553..4c79fca 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -258,7 +258,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { Write-Output "WhatIf: $releaseCreateCommand" } else { # Execute the command and capture the output - $releaseURL = & $releaseCreateCommand + $releaseURL = Start-Process $releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE @@ -300,7 +300,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { Write-Output "WhatIf: $releaseCreateCommand" } else { # Execute the command - & $releaseCreateCommand + Start-Process $releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE From 9de0f5b1c416276dd4bfa54050ddb715174f4d50 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 15:13:50 +0200 Subject: [PATCH 07/11] =?UTF-8?q?=F0=9F=A9=B9=20[Refactor]:=20Update=20rel?= =?UTF-8?q?ease=20command=20to=20remove=20'gh'=20prefix=20and=20use=20arra?= =?UTF-8?q?y=20syntax=20for=20execution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 4c79fca..a2f166e 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -231,7 +231,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { } # Build release creation command with options - $releaseCreateCommand = @("gh", "release", "create", "$newVersion") + $releaseCreateCommand = @("release", "create", "$newVersion") # Add title parameter if ($usePRTitleAsReleaseName) { @@ -258,7 +258,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { Write-Output "WhatIf: $releaseCreateCommand" } else { # Execute the command and capture the output - $releaseURL = Start-Process $releaseCreateCommand + $releaseURL = gh @releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE @@ -300,7 +300,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { Write-Output "WhatIf: $releaseCreateCommand" } else { # Execute the command - Start-Process $releaseCreateCommand + gh @releaseCreateCommand if ($LASTEXITCODE -ne 0) { Write-Error "Failed to create the release [$newVersion]." exit $LASTEXITCODE From 6900a7de3507a1ca12871e6abac559a89d651ef4 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 15:16:08 +0200 Subject: [PATCH 08/11] =?UTF-8?q?=F0=9F=A9=B9=20[Refactor]:=20Remove=20'gh?= =?UTF-8?q?'=20prefix=20from=20release=20creation=20command=20for=20improv?= =?UTF-8?q?ed=20syntax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index a2f166e..516bbc6 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -276,7 +276,7 @@ if ($createPrerelease -or $createRelease -or $whatIf) { } } else { # Build release creation command with options - $releaseCreateCommand = @("gh", "release", "create", "$newVersion") + $releaseCreateCommand = @("release", "create", "$newVersion") # Add title parameter if ($usePRTitleAsReleaseName) { From d3ba308989c2f8aac69e971437884a2db3b3b2e0 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 15:44:27 +0200 Subject: [PATCH 09/11] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20jscpd?= =?UTF-8?q?=20configuration=20to=20ignore=20scripts=20directory=20in=20dup?= =?UTF-8?q?licate=20code=20checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/linters/.jscpd.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json index 23970e8..754ec0c 100644 --- a/.github/linters/.jscpd.json +++ b/.github/linters/.jscpd.json @@ -4,7 +4,8 @@ "consoleFull" ], "ignore": [ - "**/tests/**" + "**/tests/**", + "**/scripts/**" ], "absolute": true } From e92c4dcc113056b58cda87bb9bcda0d2f89fccc6 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 15:47:14 +0200 Subject: [PATCH 10/11] =?UTF-8?q?=F0=9F=A9=B9=20[Update]:=20Set=20default?= =?UTF-8?q?=20values=20for=20UsePRBodyAsReleaseNotes=20and=20UsePRTitleAsR?= =?UTF-8?q?eleaseName=20to=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- action.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1e18cf7..837a019 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ The action can be configured using the following settings: | `MajorLabels` | A comma separated list of labels that trigger a major release. | `major, breaking` | false | | `MinorLabels` | A comma separated list of labels that trigger a minor release. | `minor, feature` | false | | `PatchLabels` | A comma separated list of labels that trigger a patch release. | `patch, fix` | false | -| `UsePRBodyAsReleaseNotes` | When enabled, uses the pull request body as the release notes for the GitHub release. | `false` | false | -| `UsePRTitleAsReleaseName` | When enabled, uses the pull request title as the name for the GitHub release. | `false` | false | +| `UsePRBodyAsReleaseNotes` | When enabled, uses the pull request body as the release notes for the GitHub release. | `true` | false | +| `UsePRTitleAsReleaseName` | When enabled, uses the pull request title as the name for the GitHub release. | `true` | false | | `VersionPrefix` | The prefix to use for the version number. | `v` | false | | `WhatIf` | Control wether to simulate the action. If enabled, the action will not create any releases. Used for testing. | `false` | false | | `Debug` | Enable debug output. | `'false'` | false | diff --git a/action.yml b/action.yml index e3fb7dc..e0212ed 100644 --- a/action.yml +++ b/action.yml @@ -53,11 +53,11 @@ inputs: UsePRBodyAsReleaseNotes: description: When enabled, uses the pull request body as the release notes for the GitHub release. required: false - default: 'false' + default: 'true' UsePRTitleAsReleaseName: description: When enabled, uses the pull request title as the name for the GitHub release. required: false - default: 'false' + default: 'true' VersionPrefix: description: The prefix to use for the version number. required: false From 642e3963ca5efd8a3275f19a1a899b12402168cd Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 19 Apr 2025 15:48:40 +0200 Subject: [PATCH 11/11] =?UTF-8?q?=F0=9F=A9=B9=20[Update]:=20Rearrange=20Us?= =?UTF-8?q?ePRTitleAsReleaseName=20and=20UsePRBodyAsReleaseNotes=20inputs?= =?UTF-8?q?=20in=20action.yml=20and=20README.md=20for=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- action.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 837a019..aba9bb9 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ The action can be configured using the following settings: | `MajorLabels` | A comma separated list of labels that trigger a major release. | `major, breaking` | false | | `MinorLabels` | A comma separated list of labels that trigger a minor release. | `minor, feature` | false | | `PatchLabels` | A comma separated list of labels that trigger a patch release. | `patch, fix` | false | +| `UsePRTitleAsReleaseName` | When enabled, uses the pull request title as the name for the GitHub release. | `false` | false | | `UsePRBodyAsReleaseNotes` | When enabled, uses the pull request body as the release notes for the GitHub release. | `true` | false | -| `UsePRTitleAsReleaseName` | When enabled, uses the pull request title as the name for the GitHub release. | `true` | false | | `VersionPrefix` | The prefix to use for the version number. | `v` | false | | `WhatIf` | Control wether to simulate the action. If enabled, the action will not create any releases. Used for testing. | `false` | false | | `Debug` | Enable debug output. | `'false'` | false | diff --git a/action.yml b/action.yml index e0212ed..9c1360a 100644 --- a/action.yml +++ b/action.yml @@ -50,13 +50,13 @@ inputs: description: A comma separated list of labels that trigger a patch release. required: false default: patch, fix - UsePRBodyAsReleaseNotes: - description: When enabled, uses the pull request body as the release notes for the GitHub release. - required: false - default: 'true' UsePRTitleAsReleaseName: description: When enabled, uses the pull request title as the name for the GitHub release. required: false + default: 'false' + UsePRBodyAsReleaseNotes: + description: When enabled, uses the pull request body as the release notes for the GitHub release. + required: false default: 'true' VersionPrefix: description: The prefix to use for the version number.