Skip to content

chore(deps-dev): bump prettier from 3.4.2 to 3.5.3 #1113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Auto-Format with Prettier on PR for "self-healing" PRs

on:
workflow_call:

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install dependencies
run: |
npm ci

- name: Check if Prettier update PR
id: check_pr
run: |
echo "PR title: ${{ github.event.pull_request.title }}"
if [[ "${{ github.event.pull_request.title }}" =~ "bump prettier from" ]]; then
echo "Prettier update detected."
echo "prettier_update=true" >> $GITHUB_ENV
else
echo "No Prettier update detected."
echo "prettier_update=false" >> $GITHUB_ENV
fi

- name: Run Prettier to format the code
if: env.prettier_update == 'true'
run: |
npx --no prettier . --write

- name: Commit changes if formatting is done
if: env.prettier_update == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'

git add .
git commit --all -m "Auto-format codebase with Prettier" || echo "No changes to commit"
git push origin HEAD:${{ github.head_ref }} # Push back to the same PR branch
3 changes: 3 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
auto-merge:
uses: ./.github/workflows/99-auto-merge.yml

dependabot-prettier-self-healing:
uses: ./.github/workflows/99-auto-format-dependabot-prettier-updates.yml

codeql:
uses: ./.github/workflows/99-codeql-analysis.yml

Expand Down
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"postcss-cli": "^11.0.1",
"postcss-focus": "^7.0.0",
"postcss-list-style-safari-fix": "^1.0.0",
"prettier": "^3.4.2",
"prettier": "^3.5.3",
"rimraf": "^6.0.1",
"sass": "^1.87.0",
"start-server-and-test": "^2.0.11",
Expand Down
Loading