mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-06-14 02:21:06 +00:00
fix: remove leading and trailing - caracter
This commit is contained in:
committed by
Romain Lespinasse
parent
93d0a6d6be
commit
be6ec48344
@@ -3,6 +3,7 @@
|
||||
slug_ref() {
|
||||
echo "$1" \
|
||||
| tr "[:upper:]" "[:lower:]" \
|
||||
| sed -r 's#refs/.*/##;s/[~\^]+//g;s/[^a-zA-Z0-9]+/-/g;s/^-+\|-+$//g;s/^-*//;s/-*$//' \
|
||||
| cut -c1-63
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user