Skip to content

Commit 8a1c9ed

Browse files
fix(ci): use pipe delimiter in sed to avoid URL slash conflict (#569)
The sed command was breaking because URLs contain '/' which is the default sed delimiter. Changed to use '|' as delimiter instead. Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
1 parent 26ae381 commit 8a1c9ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ jobs:
196196
if [[ $subject =~ $PR_PATTERN ]]; then
197197
pr_num="${BASH_REMATCH[1]}"
198198
pr_link="[#${pr_num}](https://github.com/${REPO}/pull/${pr_num})"
199-
# Replace (#123) with the hyperlink
200-
subject=$(echo "$subject" | sed "s/(#${pr_num})/(${pr_link})/")
199+
# Replace (#123) with the hyperlink (use | as delimiter to avoid conflict with URL slashes)
200+
subject=$(echo "$subject" | sed "s|(#${pr_num})|(${pr_link})|")
201201
202202
# Get contributor from PR using GitHub API
203203
pr_author=$(gh api "repos/${REPO}/pulls/${pr_num}" --jq '.user.login' 2>/dev/null || echo "")

0 commit comments

Comments
 (0)