Skip to content

Commit

Permalink
ci: fix accidental level hardcoding in adjust-changeset-level
Browse files Browse the repository at this point in the history
  • Loading branch information
angusbayley committed Feb 26, 2025
1 parent f802da1 commit 7f4cfe4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/actions/composites/adjust-changeset-level/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ runs:
run: |
echo "Adjusting changeset level from ${{ inputs.from_level }} to ${{ inputs.to_level }}"
for file in .changeset/*.md; do
if grep -q ": patch" "$file"; then
if grep -q ": ${{ inputs.from_level }}" "$file"; then
# target the lines between the "---" yaml delimiters, replace ": patch" with ": minor"
sed -i '/---/,/---/s/: patch/: minor/' "$file"
echo "Updated $file to minor"
sed -i '/---/,/---/s/: ${{ inputs.from_level }}/: ${{ inputs.to_level }}/' "$file"
echo "Updated $file to ${{ inputs.to_level }}"
fi
done

0 comments on commit 7f4cfe4

Please sign in to comment.