From f04981c422ea01c3624b718a0a91ea9eecb3131d Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Wed, 24 Sep 2025 21:58:51 +0200 Subject: [PATCH 1/2] fix: Handle boolean inputs correctly and validate supported values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix changelog-entry boolean evaluation to properly check 'true' vs 'false' strings - Add input validation for changelog-entry to only allow 'true' or 'false' - Add input validation for pr-strategy to only allow 'create' or 'update' 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- updater/action.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/updater/action.yml b/updater/action.yml index 461cfba..a21da6c 100644 --- a/updater/action.yml +++ b/updater/action.yml @@ -82,6 +82,26 @@ runs: } Write-Output "✓ Dependency path '${{ inputs.path }}' is valid" + - name: Validate changelog-entry + shell: pwsh + run: | + # Validate that inputs.changelog-entry is either 'true' or 'false' + if ('${{ inputs.changelog-entry }}' -notin @('true', 'false')) { + Write-Output "::error::Invalid changelog-entry value: '${{ inputs.changelog-entry }}'. Only 'true' or 'false' are allowed." + exit 1 + } + Write-Output "✓ Changelog-entry value '${{ inputs.changelog-entry }}' is valid" + + - name: Validate pr-strategy + shell: pwsh + run: | + # Validate that inputs.pr-strategy is either 'create' or 'update' + if ('${{ inputs.pr-strategy }}' -notin @('create', 'update')) { + Write-Output "::error::Invalid pr-strategy value: '${{ inputs.pr-strategy }}'. Only 'create' or 'update' are allowed." + exit 1 + } + Write-Output "✓ PR strategy value '${{ inputs.pr-strategy }}' is valid" + # What we need to accomplish: # * update to the latest tag # * create a PR @@ -254,7 +274,7 @@ runs: run: ${{ github.action_path }}/scripts/update-dependency.ps1 -Path $env:DEPENDENCY_PATH -Tag '${{ steps.target.outputs.latestTag }}' - name: Update Changelog - if: ${{ inputs.changelog-entry && ( steps.target.outputs.latestTag != steps.target.outputs.originalTag ) && ( steps.root.outputs.changed == 'false') }} + if: ${{ inputs.changelog-entry == 'true' && ( steps.target.outputs.latestTag != steps.target.outputs.originalTag ) && ( steps.root.outputs.changed == 'false') }} shell: pwsh working-directory: caller-repo env: From c15ff3017c55b3b2b10a4757e5a9e792746b1805 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Wed, 24 Sep 2025 22:00:11 +0200 Subject: [PATCH 2/2] docs: Add changelog entry for boolean input fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c14f12b..8d346e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Updater - Fix boolean input handling for `changelog-entry` parameter and add input validation ([#127](https://github.com/getsentry/github-workflows/pull/127)) + ## 3.0.0 ### Breaking Changes