-
-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (45 loc) · 1.31 KB
/
Prettier.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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