Skip to content

update commit hash

update commit hash #35

name: Remove Function Name Prefixes
on:
workflow_call:
push:
jobs:
remove-function-prefix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
git pull origin ${{ github.ref }}
for file in $(find ./snippets/functions/ -type f -name '*.js'); do
if [[ "$file" == *"_"* ]];then
justfile=$(basename -- "$file")
justpath=$(dirname "$file")
justfile="${justfile#*_}"
echo "was:" $file
echo "saving as" $justpath/$justfile
mv -f $file $justpath/$justfile
fi
done
if [ "$(git diff --name-only)" ]; then
git add .
git config --global user.email "[email protected]"
git config --global user.name "ActionBot"
git commit -m 'remove function name prefix'
git push origin ${{ github.ref }}
else
echo "no changes to commit"
fi
echo "changes committed"