Skip to content

Commit 801e11f

Browse files
committed
Turn package names into hyperlinks in deprecation message
1 parent 62b8fa0 commit 801e11f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/deprecate_packages.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,11 @@ jobs:
9898
git config --local user.email "noreply@stdlib.io"
9999
git config --local user.name "stdlib-bot"
100100
101+
# Turn `@stdlib` package names in deprecation messages into hyperlinks:
102+
readme_msg=$(echo $msg | sed -e 's/`\?@stdlib\/\([^ `]*\)`\?/[@stdlib\/\1](https:\/\/github.com\/stdlib-js\/\1)/g')
103+
101104
# Add deprecation notice to the beginning of the `README.md` file:
102-
sed -i "1 i\## Attention\n\n:warning: **$msg** :warning:\n\n<br>\n\n* * *\n" README.md
105+
sed -i "1 i\## Attention\n\n:warning: **$readme_msg** :warning:\n\n<br>\n\n* * *\n" README.md
103106
104107
# Commit the changes:
105108
git add README.md

0 commit comments

Comments
 (0)