Skip to content

fix: html injection towards error reproting #332

fix: html injection towards error reproting

fix: html injection towards error reproting #332

Workflow file for this run

name: Code formatting check
on:
push:
branches:
- main
jobs:
Format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Set up Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Prettier
run: npm install --save-dev prettier
- name: Format code with Prettier
run: npx prettier --config .prettierrc.js "website/**/*.js" "functions/archivePurchasedPhotos/**/*.js" "functions/compressPublicPhotos/**/*.js" "functions/deletePublicPhotos/**/*.js" --check
- name: Commit changes if needed
if: failure()
run: |
npx prettier --config .prettierrc.js "website/**/*.js" "functions/archivePurchasedPhotos/**/*.js" "functions/compressPublicPhotos/**/*.js" "functions/deletePublicPhotos/**/*.js" --write
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "style: :art: format code with Prettier"
git push