Skip to content

Commit bfd8c91

Browse files
committed
Auto fix PRs that fail Prettier
1 parent 3dfaaf6 commit bfd8c91

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/lint.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,21 @@ jobs:
4848
- name: Install Node packages
4949
run: npm ci --ignore-scripts
5050

51-
- name: Run Prettier
51+
- name: Check formatting
5252
run: npx prettier --check .
5353

54+
- name: Apply formatting
55+
if: github.event_name == 'pull_request'
56+
run: npm run format
57+
58+
- name: Commit formatting changes
59+
if: github.event_name == 'pull_request'
60+
uses: EndBug/add-and-commit@v9
61+
with:
62+
default_author: github_actions
63+
message: Apply Prettier formatting
64+
add: "."
65+
5466
eslint:
5567
name: ESLint
5668
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)