From 3d0aabcb4063f8b1cc74d6c8a41b05dbeaa5d377 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 01:10:34 +0000 Subject: [PATCH 01/12] chore(deps-dev): bump prettier from 3.4.2 to 3.5.3 Bumps [prettier](https://github.com/prettier/prettier) from 3.4.2 to 3.5.3. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.4.2...3.5.3) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 15 ++++++++------- package.json | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba90afb83d..1b5fd70701 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,7 +46,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.86.1", "start-server-and-test": "^2.0.11", @@ -16135,10 +16135,11 @@ } }, "node_modules/prettier": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", - "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -31793,9 +31794,9 @@ "dev": true }, "prettier": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", - "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "dev": true }, "prettier-linter-helpers": { diff --git a/package.json b/package.json index 1572c55b62..eb666fad0b 100644 --- a/package.json +++ b/package.json @@ -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.86.1", "start-server-and-test": "^2.0.11", From 84c0659cdce11adf2baedc2487d500936be8e29c Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 08:48:54 +0200 Subject: [PATCH 02/12] Create 99-auto-format-dependabot-prettier-updates.yml --- ...uto-format-dependabot-prettier-updates.yml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/99-auto-format-dependabot-prettier-updates.yml diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml new file mode 100644 index 0000000000..6a109d6028 --- /dev/null +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -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 + + - 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' + + # Checkout the PR branch (already done by actions/checkout) + git checkout ${{ github.head_ref }} # This ensures we're on the PR branch + + git add . + git commit -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 From 10a1c8d4fcc29f680e794fafa9de66573d975ba8 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 08:49:47 +0200 Subject: [PATCH 03/12] Update pull-request.yml --- .github/workflows/pull-request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 64a996e358..134d8322a0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -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 From 6ad5a7f6ab7ea4cae355052e4739f554968ed28c Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 08:51:59 +0200 Subject: [PATCH 04/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../workflows/99-auto-format-dependabot-prettier-updates.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index 6a109d6028..c4f8f5f95a 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -41,6 +41,8 @@ jobs: run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' + + git fetch # Checkout the PR branch (already done by actions/checkout) git checkout ${{ github.head_ref }} # This ensures we're on the PR branch From 8a0a7d54ea4af383d22b6e0fb36a12e66bfe2e7f Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 08:54:58 +0200 Subject: [PATCH 05/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../workflows/99-auto-format-dependabot-prettier-updates.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index c4f8f5f95a..047e5cbc3c 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -41,8 +41,8 @@ jobs: run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - - git fetch + + git status # Checkout the PR branch (already done by actions/checkout) git checkout ${{ github.head_ref }} # This ensures we're on the PR branch From 9d3ad1c9cb76213da9b814903abd4f85782b5744 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 08:57:30 +0200 Subject: [PATCH 06/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../workflows/99-auto-format-dependabot-prettier-updates.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index 047e5cbc3c..196f7eb39a 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -10,6 +10,9 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Branch name + run: echo running on branch ${GITHUB_REF##*/} + - name: Set up Node.js uses: actions/setup-node@v4 with: From 5f0e876fb846faf5a6b796474d5b3fcaa4c5c7c1 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 08:59:07 +0200 Subject: [PATCH 07/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../workflows/99-auto-format-dependabot-prettier-updates.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index 196f7eb39a..0a22dc5557 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -9,6 +9,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 - name: Branch name run: echo running on branch ${GITHUB_REF##*/} From 86484ab7d2a8019c59fc19c3c918c2dd4b721388 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 09:02:48 +0200 Subject: [PATCH 08/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../workflows/99-auto-format-dependabot-prettier-updates.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index 0a22dc5557..46df7d985f 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -13,9 +13,6 @@ jobs: ref: ${{ github.ref }} fetch-depth: 0 - - name: Branch name - run: echo running on branch ${GITHUB_REF##*/} - - name: Set up Node.js uses: actions/setup-node@v4 with: @@ -40,7 +37,7 @@ jobs: - name: Run Prettier to format the code if: env.prettier_update == 'true' run: | - npx --no prettier --write . + npx --no prettier . --write - name: Commit changes if formatting is done if: env.prettier_update == 'true' From 5cb850622940332f375ac243277b57241a4f5a9a Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 09:18:11 +0200 Subject: [PATCH 09/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../workflows/99-auto-format-dependabot-prettier-updates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index 46df7d985f..c7ff8c97fd 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -51,5 +51,5 @@ jobs: git checkout ${{ github.head_ref }} # This ensures we're on the PR branch git add . - git commit -m "Auto-format codebase with Prettier" || echo "No changes to commit" + git commit -a -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 From b8e60bd927a10c62bc13b19d545e2d7533465d3d Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 09:21:00 +0200 Subject: [PATCH 10/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../99-auto-format-dependabot-prettier-updates.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index c7ff8c97fd..edc05b8654 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -44,12 +44,7 @@ jobs: run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - - git status - - # Checkout the PR branch (already done by actions/checkout) - git checkout ${{ github.head_ref }} # This ensures we're on the PR branch git add . - git commit -a -m "Auto-format codebase with Prettier" || echo "No changes to commit" + 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 From 17cb3552f68a7363ee955d1afa6b1fc52ba4055a Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 09:23:07 +0200 Subject: [PATCH 11/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../workflows/99-auto-format-dependabot-prettier-updates.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index edc05b8654..4018cb7286 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -45,6 +45,9 @@ jobs: git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' + # Checkout the PR branch (already done by actions/checkout) + git checkout ${{ github.head_ref }} # This ensures we're on the PR branch + 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 From ed69bef675af66e5ee4927516f1116626dbe3628 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Tue, 22 Apr 2025 09:25:35 +0200 Subject: [PATCH 12/12] Update 99-auto-format-dependabot-prettier-updates.yml --- .../workflows/99-auto-format-dependabot-prettier-updates.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml index 4018cb7286..c83c14c484 100644 --- a/.github/workflows/99-auto-format-dependabot-prettier-updates.yml +++ b/.github/workflows/99-auto-format-dependabot-prettier-updates.yml @@ -10,7 +10,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: ${{ github.ref }} + ref: ${{github.event.pull_request.head.ref}} fetch-depth: 0 - name: Set up Node.js @@ -45,9 +45,6 @@ jobs: git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - # Checkout the PR branch (already done by actions/checkout) - git checkout ${{ github.head_ref }} # This ensures we're on the PR branch - 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