Run Formatters #159
This file contains 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: Formatter | |
run-name: Run Formatters | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- development | |
- master | |
paths: | |
- "backend/**" | |
- "frontend/**" | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
name: Format Files | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Format Backend | |
working-directory: backend | |
run: npx prettier --write **/*.js | |
- name: Format Frontend | |
working-directory: frontend | |
run: npm run format | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: "style: Format code using Prettier" | |
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
branch: github-actions | |
delete-branch: true | |
title: 'Apply Code Formatting with Prettier' | |
body: | | |
- Format code using Prettier | |
- This PR is auto-generated by GitHub Actions | |
labels: | | |
automated-PR | |
backend-format | |
frontend-format | |
assignees: nmdra |