mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2026-03-02 03:39:24 +00:00
Template Cleanup: escape GitHub username to avoid incorrect characters in class package name #74
This commit is contained in:
5
.github/workflows/template-cleanup.yml
vendored
5
.github/workflows/template-cleanup.yml
vendored
@@ -29,9 +29,10 @@ jobs:
|
||||
|
||||
# Prepare variables
|
||||
NAME="${GITHUB_REPOSITORY##*/}"
|
||||
SAFE_NAME=$(echo $NAME | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
|
||||
ACTOR=$(echo $GITHUB_ACTOR | tr '[:upper:]' '[:lower:]')
|
||||
GROUP="com.github.$ACTOR.$SAFE_NAME"
|
||||
SAFE_NAME=$(echo $NAME | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
|
||||
SAFE_ACTOR=$(echo $ACTOR | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]')
|
||||
GROUP="com.github.$SAFE_ACTOR.$SAFE_NAME"
|
||||
|
||||
# Replace placeholders in the template-cleanup files
|
||||
sed -i "s/%NAME%/$NAME/g" .github/template-cleanup/*
|
||||
|
||||
Reference in New Issue
Block a user