update commit hash #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |