-
-
Notifications
You must be signed in to change notification settings - Fork 204
66 lines (54 loc) · 1.39 KB
/
prettier-fix.yml
File metadata and controls
66 lines (54 loc) · 1.39 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Formatting
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
prettier-check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Check Code Formatting
defaults:
run:
working-directory: mcpjam-inspector
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npx prettier --check .
prettier-fix:
if: github.event_name == 'push'
runs-on: ubuntu-latest
name: Auto-fix Formatting
permissions:
contents: write
defaults:
run:
working-directory: mcpjam-inspector
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Install dependencies
run: npm ci
- name: Run prettier fix
run: npm run prettier-fix
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: auto-fix prettier formatting"