Skip to content

Commit 3841d24

Browse files
vaindclaude
andcommitted
refactor: Split input validation into separate steps
Split the single validation step into two distinct steps for better clarity and more granular error reporting: - Validate dependency name - Validate dependency path Each step now also logs a success message when validation passes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2fa8e16 commit 3841d24

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/updater.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,23 @@ jobs:
7575
validate-inputs:
7676
runs-on: ubuntu-latest
7777
steps:
78-
- name: Validate inputs
78+
- name: Validate dependency name
7979
run: |
8080
# Validate that inputs.name contains only safe characters
8181
if [[ ! "${{ inputs.name }}" =~ ^[a-zA-Z0-9_\-\./@ ]+$ ]]; then
8282
echo "::error::Invalid dependency name: '${{ inputs.name }}'. Only alphanumeric characters, spaces, and _-./@ are allowed."
8383
exit 1
8484
fi
85-
85+
echo "✓ Dependency name '${{ inputs.name }}' is valid"
86+
87+
- name: Validate dependency path
88+
run: |
8689
# Validate that inputs.path contains only safe characters
8790
if [[ ! "${{ inputs.path }}" =~ ^[a-zA-Z0-9_\-\./]+$ ]]; then
8891
echo "::error::Invalid dependency path: '${{ inputs.path }}'. Only alphanumeric characters and _-./ are allowed."
8992
exit 1
9093
fi
94+
echo "✓ Dependency path '${{ inputs.path }}' is valid"
9195
9296
# What we need to accomplish:
9397
# * update to the latest tag

0 commit comments

Comments
 (0)