Skip to content

Commit a726af4

Browse files
committed
build: escape control characters
1 parent 08dc8f8 commit a726af4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/update_pr_copyright_years.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ jobs:
6969
-H "Authorization: Bearer $GITHUB_TOKEN" \
7070
"https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ inputs.pull_request_number }}")
7171
72-
# Extract the needed details
72+
# Escape control characters:
73+
pr_response=$(echo "$pr_response" | tr -d '\000-\031')
74+
75+
# Extract the needed details:
7376
pr_branch=$(echo "$pr_response" | jq -r '.head.ref') # PR's branch
7477
pr_repo_full_name=$(echo "$pr_response" | jq -r '.head.repo.full_name') # PR's repo full name
7578
76-
# Set outputs for the branch and repository
79+
# Set outputs for the branch and repository:
7780
echo "branch=$pr_branch" >> $GITHUB_OUTPUT
7881
echo "repository=$pr_repo_full_name" >> $GITHUB_OUTPUT
7982

0 commit comments

Comments
 (0)