Skip to content

Commit

Permalink
Keep spaces and newline characters when sanitizing the commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
ll-nick committed Nov 21, 2024
1 parent f8ffd24 commit 1b63fb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
source version
new_version=$(.github/workflows/compute_version.sh "$VERSION" "${PR_BODY//[^a-zA-Z0-9#]/}")
new_version=$(.github/workflows/compute_version.sh "$VERSION" "${PR_BODY//[^a-zA-Z0-9# $'\n']/}")
echo "new_version=$new_version" >> $GITHUB_OUTPUT
update-version-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compute_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ $# -ne 2 ]]; then
fi

initial_version=${1//[^0-9.]/}
input_string=${2//[^a-zA-Z0-9#]/}
input_string=${2//[^a-zA-Z0-9# $'\n']/}

initial_major=$(echo "$initial_version" | cut -d'.' -f1)
initial_minor=$(echo "$initial_version" | cut -d'.' -f2)
Expand Down

0 comments on commit 1b63fb3

Please sign in to comment.