From 7b7bf92d90dcadde6b71876ad3624a66d5a503a6 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 12:21:44 +0100 Subject: [PATCH 01/44] add steps to fix pretty errors --- .github/workflows/monkey-ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 7193bb64dc16..0ffd96641185 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -115,11 +115,9 @@ jobs: name: Install dependencies run: pnpm install - check-pretty: - name: check-pretty - needs: [pre-ci, prime-cache] + prettify-check: + name: Prettify Check runs-on: ubuntu-latest - if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci') steps: - uses: actions/checkout@v4 @@ -163,8 +161,21 @@ jobs: - name: Check pretty (all files) if: github.event_name == 'push' + id: check-pretty-all run: pnpm prettier --check . + - name: Fix pretty (changed files) + if: github.event_name == 'pull_request' && steps.check-pretty.conclusion == 'failure' + run: | + CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) + if [ -n "$CHANGED_FILES" ]; then + pnpm prettier --write $CHANGED_FILES + fi + + - name: Fix pretty (all files) + if: github.event_name == 'push' && steps.check-pretty-all.conclusion == 'failure' + run: pnpm prettier --write . + ci-be: name: ci-be needs: [pre-ci, prime-cache, check-pretty] From 9ca3b803310f8c62aed0fd7cb69f36afe3c90312 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 22 Jan 2025 12:23:34 +0100 Subject: [PATCH 02/44] pretty mess up --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 374043787817..beb6898ff233 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -74,7 +74,7 @@ const koInputVisual = document.getElementById("koInputVisual") as HTMLElement; export let notSignedInLastResult: CompletedEvent | null = null; export function clearNotSignedInResult(): void { - notSignedInLastResult = null; +notSignedInLastResult = null; } export function setNotSignedInUidAndHash(uid: string): void { From 73d087739cdb9fbaeacd9a49c562ab71c06dae48 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 22 Jan 2025 12:25:27 +0100 Subject: [PATCH 03/44] test --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index beb6898ff233..6490ac336494 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -79,7 +79,7 @@ notSignedInLastResult = null; export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; - notSignedInLastResult.uid = uid; +notSignedInLastResult.uid = uid; //@ts-expect-error delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); From e03b6a67925bdfb57f927884d70215e7e10ee8fc Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 22 Jan 2025 12:26:21 +0100 Subject: [PATCH 04/44] test --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 6490ac336494..6e7c35bedb2f 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -81,7 +81,7 @@ export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; notSignedInLastResult.uid = uid; //@ts-expect-error - delete notSignedInLastResult.hash; +delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); } From a49ccd7ca0a99cb983fb7ec194eb85d4370a158d Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 12:28:07 +0100 Subject: [PATCH 05/44] typo --- .github/workflows/monkey-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 0ffd96641185..9a9336a9121e 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -115,7 +115,7 @@ jobs: name: Install dependencies run: pnpm install - prettify-check: + prettify-check: name: Prettify Check runs-on: ubuntu-latest steps: From 1a2f9da0887066389a6dddcab0d2430b60c6675f Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 12:29:45 +0100 Subject: [PATCH 06/44] fix missing props --- .github/workflows/monkey-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 9a9336a9121e..d673f50cbba9 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -115,9 +115,11 @@ jobs: name: Install dependencies run: pnpm install - prettify-check: - name: Prettify Check + check-pretty: + name: check-pretty + needs: [pre-ci, prime-cache] runs-on: ubuntu-latest + if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci') steps: - uses: actions/checkout@v4 From cc242b40825a2a5718c872908e7452f9f5af961a Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 12:32:23 +0100 Subject: [PATCH 07/44] continue on error --- .github/workflows/monkey-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index d673f50cbba9..1ae16b6bf14a 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -155,6 +155,7 @@ jobs: - name: Check pretty (changed files) if: github.event_name == 'pull_request' id: check-pretty + continue-on-error: true run: | CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) if [ -n "$CHANGED_FILES" ]; then @@ -164,6 +165,7 @@ jobs: - name: Check pretty (all files) if: github.event_name == 'push' id: check-pretty-all + continue-on-error: true run: pnpm prettier --check . - name: Fix pretty (changed files) From 7c682051c1768f29b4edd5770435f4827bceb507 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 12:42:28 +0100 Subject: [PATCH 08/44] test --- .github/workflows/monkey-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 1ae16b6bf14a..633999822be6 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -167,6 +167,11 @@ jobs: id: check-pretty-all continue-on-error: true run: pnpm prettier --check . + + - name: Log + run: | + echo steps.check-pretty.conclusion ${{ steps.check-pretty.conclusion }} + echo steps.check-pretty-all.conclusion ${{ steps.check-pretty-all.conclusion }} - name: Fix pretty (changed files) if: github.event_name == 'pull_request' && steps.check-pretty.conclusion == 'failure' From 05fb12be315bf64084e5e09a0b5443f17f196e5e Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 12:47:20 +0100 Subject: [PATCH 09/44] log --- .github/workflows/monkey-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 633999822be6..0d1a402123a8 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -172,6 +172,10 @@ jobs: run: | echo steps.check-pretty.conclusion ${{ steps.check-pretty.conclusion }} echo steps.check-pretty-all.conclusion ${{ steps.check-pretty-all.conclusion }} + echo steps.check-pretty.outcome ${{ steps.check-pretty.outcome }} + echo steps.check-pretty-all.outcome ${{ steps.check-pretty-all.outcome }} + echo fail ${{ failure() }} + echo always ${{ always() }} - name: Fix pretty (changed files) if: github.event_name == 'pull_request' && steps.check-pretty.conclusion == 'failure' From da383b9d0bcdd13350d2cca187655959d5bd4536 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 12:56:03 +0100 Subject: [PATCH 10/44] test --- .github/workflows/monkey-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 0d1a402123a8..9df17a087429 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -174,8 +174,6 @@ jobs: echo steps.check-pretty-all.conclusion ${{ steps.check-pretty-all.conclusion }} echo steps.check-pretty.outcome ${{ steps.check-pretty.outcome }} echo steps.check-pretty-all.outcome ${{ steps.check-pretty-all.outcome }} - echo fail ${{ failure() }} - echo always ${{ always() }} - name: Fix pretty (changed files) if: github.event_name == 'pull_request' && steps.check-pretty.conclusion == 'failure' From a63e939d01a492dcdd878d3ce76e43f12a3de830 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 12:57:32 +0100 Subject: [PATCH 11/44] use outcome --- .github/workflows/monkey-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 9df17a087429..f088f08771b8 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -176,7 +176,7 @@ jobs: echo steps.check-pretty-all.outcome ${{ steps.check-pretty-all.outcome }} - name: Fix pretty (changed files) - if: github.event_name == 'pull_request' && steps.check-pretty.conclusion == 'failure' + if: github.event_name == 'pull_request' && steps.check-pretty.outcome == 'failure' run: | CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) if [ -n "$CHANGED_FILES" ]; then @@ -184,7 +184,7 @@ jobs: fi - name: Fix pretty (all files) - if: github.event_name == 'push' && steps.check-pretty-all.conclusion == 'failure' + if: github.event_name == 'push' && steps.check-pretty-all.outcome == 'failure' run: pnpm prettier --write . ci-be: From 6735d5a334eaf10972b9f7645dd95a45d9661525 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:03:06 +0100 Subject: [PATCH 12/44] commit --- .github/workflows/monkey-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index f088f08771b8..d2da2c7526fd 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -176,6 +176,7 @@ jobs: echo steps.check-pretty-all.outcome ${{ steps.check-pretty-all.outcome }} - name: Fix pretty (changed files) + id: fix-pretty if: github.event_name == 'pull_request' && steps.check-pretty.outcome == 'failure' run: | CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) @@ -184,9 +185,16 @@ jobs: fi - name: Fix pretty (all files) + id: fix-pretty-all if: github.event_name == 'push' && steps.check-pretty-all.outcome == 'failure' run: pnpm prettier --write . + - name: Commmit fixes + if: steps.fix-pretty.outputs.result == 'success' || steps.fix-pretty-all.outputs.result == 'success' + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Fix prettier" + ci-be: name: ci-be needs: [pre-ci, prime-cache, check-pretty] From 46823719f25bfcf41d417a748156da757231a777 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:05:03 +0100 Subject: [PATCH 13/44] log2 --- .github/workflows/monkey-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index d2da2c7526fd..f98adc679410 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -189,6 +189,13 @@ jobs: if: github.event_name == 'push' && steps.check-pretty-all.outcome == 'failure' run: pnpm prettier --write . + - name: Log2 + run: / + echo steps.fix-pretty.conclusion ${{ steps.fix-pretty.conclusion }} + echo steps.fix-pretty-all.conclusion ${{ steps.fix-pretty-all.conclusion }} + echo steps.fix-pretty.outcome ${{ steps.fix-pretty.outcome }} + echo steps.fix-pretty-all.outcome ${{ steps.fix-pretty-all.outcome }} + - name: Commmit fixes if: steps.fix-pretty.outputs.result == 'success' || steps.fix-pretty-all.outputs.result == 'success' uses: stefanzweifel/git-auto-commit-action@v5 From fc17f2ebb31adc02703e1ec5dd7baabc845f77f4 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:07:20 +0100 Subject: [PATCH 14/44] use outcome --- .github/workflows/monkey-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index f98adc679410..72ff977f9d02 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -197,7 +197,7 @@ jobs: echo steps.fix-pretty-all.outcome ${{ steps.fix-pretty-all.outcome }} - name: Commmit fixes - if: steps.fix-pretty.outputs.result == 'success' || steps.fix-pretty-all.outputs.result == 'success' + if: steps.fix-pretty.outcome == 'success' || steps.fix-pretty-all.outcome == 'success' uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Fix prettier" From 481accfc990364522f412161e3d8da271108cf9d Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:08:35 +0100 Subject: [PATCH 15/44] remove log2 --- .github/workflows/monkey-ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 72ff977f9d02..dec5dae2677d 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -189,13 +189,6 @@ jobs: if: github.event_name == 'push' && steps.check-pretty-all.outcome == 'failure' run: pnpm prettier --write . - - name: Log2 - run: / - echo steps.fix-pretty.conclusion ${{ steps.fix-pretty.conclusion }} - echo steps.fix-pretty-all.conclusion ${{ steps.fix-pretty-all.conclusion }} - echo steps.fix-pretty.outcome ${{ steps.fix-pretty.outcome }} - echo steps.fix-pretty-all.outcome ${{ steps.fix-pretty-all.outcome }} - - name: Commmit fixes if: steps.fix-pretty.outcome == 'success' || steps.fix-pretty-all.outcome == 'success' uses: stefanzweifel/git-auto-commit-action@v5 From 93a434a6d2005c899977ac5732da82f8f0a241f7 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:18:40 +0100 Subject: [PATCH 16/44] permissions --- .github/workflows/monkey-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index dec5dae2677d..43262c16d743 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -191,6 +191,8 @@ jobs: - name: Commmit fixes if: steps.fix-pretty.outcome == 'success' || steps.fix-pretty-all.outcome == 'success' + permissions: + contents: write uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Fix prettier" From 76f45753d2bf90ee812c1234544987e085ccbf5d Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:19:37 +0100 Subject: [PATCH 17/44] move perm --- .github/workflows/monkey-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 43262c16d743..04e6e5547739 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -119,6 +119,8 @@ jobs: name: check-pretty needs: [pre-ci, prime-cache] runs-on: ubuntu-latest + permissions: + contents: write if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci') steps: - uses: actions/checkout@v4 @@ -191,8 +193,6 @@ jobs: - name: Commmit fixes if: steps.fix-pretty.outcome == 'success' || steps.fix-pretty-all.outcome == 'success' - permissions: - contents: write uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Fix prettier" From 22d837ccd08e01a41aab14e8e762adba50b1821e Mon Sep 17 00:00:00 2001 From: Miodec <13181393+Miodec@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:20:48 +0000 Subject: [PATCH 18/44] Fix prettier --- frontend/src/ts/test/test-logic.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 6e7c35bedb2f..374043787817 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -74,14 +74,14 @@ const koInputVisual = document.getElementById("koInputVisual") as HTMLElement; export let notSignedInLastResult: CompletedEvent | null = null; export function clearNotSignedInResult(): void { -notSignedInLastResult = null; + notSignedInLastResult = null; } export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; -notSignedInLastResult.uid = uid; + notSignedInLastResult.uid = uid; //@ts-expect-error -delete notSignedInLastResult.hash; + delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); } From 58d7511f606c040551af4891f09771aa50733fe0 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:31:10 +0100 Subject: [PATCH 19/44] remove log --- .github/workflows/monkey-ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 04e6e5547739..f9ed32ab9d35 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -169,13 +169,6 @@ jobs: id: check-pretty-all continue-on-error: true run: pnpm prettier --check . - - - name: Log - run: | - echo steps.check-pretty.conclusion ${{ steps.check-pretty.conclusion }} - echo steps.check-pretty-all.conclusion ${{ steps.check-pretty-all.conclusion }} - echo steps.check-pretty.outcome ${{ steps.check-pretty.outcome }} - echo steps.check-pretty-all.outcome ${{ steps.check-pretty-all.outcome }} - name: Fix pretty (changed files) id: fix-pretty From b908cb78fb88d91cfcf2ed7da50adf856e2d08ec Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:31:29 +0100 Subject: [PATCH 20/44] commit message --- .github/workflows/monkey-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index f9ed32ab9d35..1859ba0bc7e0 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -188,7 +188,7 @@ jobs: if: steps.fix-pretty.outcome == 'success' || steps.fix-pretty-all.outcome == 'success' uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: "Fix prettier" + commit_message: "chore: prettier fixes" ci-be: name: ci-be From 469d7451bd1d4112e1fd2a89151e6112715ea202 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 13:34:48 +0100 Subject: [PATCH 21/44] wrong branch test --- .github/workflows/monkey-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 1859ba0bc7e0..7c1c6eba55ef 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -189,6 +189,8 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore: prettier fixes" + commit_options: '--no-verify --force' + branch: "ci-pretty-fix-test" ci-be: name: ci-be From 6a4c2e65f123edc0792fdf8ecffd66e45cda4422 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 22 Jan 2025 13:36:08 +0100 Subject: [PATCH 22/44] test --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 374043787817..9e12fd5f5bdf 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -81,7 +81,7 @@ export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; notSignedInLastResult.uid = uid; //@ts-expect-error - delete notSignedInLastResult.hash; +delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); } From 2d8845a12efa28b97b77ea040cc20ff16086c684 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 22 Jan 2025 14:29:17 +0100 Subject: [PATCH 23/44] remove test --- .github/workflows/monkey-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 7c1c6eba55ef..1859ba0bc7e0 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -189,8 +189,6 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore: prettier fixes" - commit_options: '--no-verify --force' - branch: "ci-pretty-fix-test" ci-be: name: ci-be From 1b69a37646243a168cd93e26a35f34974bc4d457 Mon Sep 17 00:00:00 2001 From: Miodec <13181393+Miodec@users.noreply.github.com> Date: Wed, 22 Jan 2025 13:30:29 +0000 Subject: [PATCH 24/44] chore: prettier fixes --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 9e12fd5f5bdf..374043787817 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -81,7 +81,7 @@ export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; notSignedInLastResult.uid = uid; //@ts-expect-error -delete notSignedInLastResult.hash; + delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); } From 241fae5979bee61ec7e22fd596f5e5e85593a1fd Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 20:45:11 +0100 Subject: [PATCH 25/44] move pretty check to a new job --- .github/workflows/monkey-ci.yml | 81 ++---------------------------- .github/workflows/pretty-check.yml | 56 +++++++++++++++++++++ 2 files changed, 59 insertions(+), 78 deletions(-) create mode 100644 .github/workflows/pretty-check.yml diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 1859ba0bc7e0..6ed9b060e67c 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -115,84 +115,9 @@ jobs: name: Install dependencies run: pnpm install - check-pretty: - name: check-pretty - needs: [pre-ci, prime-cache] - runs-on: ubuntu-latest - permissions: - contents: write - if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci') - steps: - - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - - - name: Install prettier - run: pnpm add -g prettier@2.8.8 - - - name: Get changed files - if: github.event_name == 'pull_request' - id: get-changed-files - uses: actions/github-script@v7 - with: - script: | - const changedFiles = await github.paginate( - github.rest.pulls.listFiles, - { - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - } - ); - return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' '); - - - name: Check pretty (changed files) - if: github.event_name == 'pull_request' - id: check-pretty - continue-on-error: true - run: | - CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) - if [ -n "$CHANGED_FILES" ]; then - pnpm prettier --check $CHANGED_FILES - fi - - - name: Check pretty (all files) - if: github.event_name == 'push' - id: check-pretty-all - continue-on-error: true - run: pnpm prettier --check . - - - name: Fix pretty (changed files) - id: fix-pretty - if: github.event_name == 'pull_request' && steps.check-pretty.outcome == 'failure' - run: | - CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) - if [ -n "$CHANGED_FILES" ]; then - pnpm prettier --write $CHANGED_FILES - fi - - - name: Fix pretty (all files) - id: fix-pretty-all - if: github.event_name == 'push' && steps.check-pretty-all.outcome == 'failure' - run: pnpm prettier --write . - - - name: Commmit fixes - if: steps.fix-pretty.outcome == 'success' || steps.fix-pretty-all.outcome == 'success' - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "chore: prettier fixes" - ci-be: name: ci-be - needs: [pre-ci, prime-cache, check-pretty] + needs: [pre-ci, prime-cache] runs-on: ubuntu-latest if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci') steps: @@ -240,7 +165,7 @@ jobs: ci-fe: name: ci-fe - needs: [pre-ci, prime-cache, check-pretty] + needs: [pre-ci, prime-cache] runs-on: ubuntu-latest if: needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci') steps: @@ -293,7 +218,7 @@ jobs: ci-assets: name: ci-assets - needs: [pre-ci, prime-cache, check-pretty] + needs: [pre-ci, prime-cache] runs-on: ubuntu-latest if: needs.pre-ci.outputs.assets-json == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci') steps: diff --git a/.github/workflows/pretty-check.yml b/.github/workflows/pretty-check.yml new file mode 100644 index 000000000000..8fa06656048a --- /dev/null +++ b/.github/workflows/pretty-check.yml @@ -0,0 +1,56 @@ +name: Prettier Check + +env: + NODE_VERSION: "20.16.0" + +on: + pull_request: + branches: [master] + types: [opened, reopened, synchronize, ready_for_review] + +jobs: + check-prettier: + if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'force-ci') || contains(github.event.pull_request.labels.*.name, 'force-full-ci') + name: Check Prettier + runs-on: ubuntu-latest + + steps: + - name: Full checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} + + - name: Install prettier + run: pnpm add -g prettier@2.8.8 + + + - name: Get changed files + id: get-changed-files + uses: actions/github-script@v7 + with: + script: | + const changedFiles = await github.paginate( + github.rest.pulls.listFiles, + { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + } + ); + return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' '); + + - name: Check pretty (changed files) + run: | + CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) + if [ -n "$CHANGED_FILES" ]; then + pnpm prettier --check $CHANGED_FILES + fi + \ No newline at end of file From c0c2b443ef7b8bb0d2e4538fb9e5d760467f2978 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 23 Jan 2025 20:47:17 +0100 Subject: [PATCH 26/44] test --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 374043787817..62627ac1d14e 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -79,7 +79,7 @@ export function clearNotSignedInResult(): void { export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; - notSignedInLastResult.uid = uid; +notSignedInLastResult.uid = uid; //@ts-expect-error delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); From ed1eacd709b63df156cc9c1243d89ab717b8803d Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 20:49:35 +0100 Subject: [PATCH 27/44] fix dep --- .github/workflows/monkey-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index 6ed9b060e67c..b154ebbc0e11 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -287,7 +287,7 @@ jobs: ci-pkg: name: ci-pkg - needs: [pre-ci, prime-cache,check-pretty] + needs: [pre-ci, prime-cache] runs-on: ubuntu-latest if: needs.pre-ci.outputs.should-build-pkg == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci') steps: From 5c9e0c69ddafd685c39d23d37ab7222a222c3067 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 20:49:43 +0100 Subject: [PATCH 28/44] remmove name, change id --- .github/workflows/pretty-check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pretty-check.yml b/.github/workflows/pretty-check.yml index 8fa06656048a..33a4c5cf96a5 100644 --- a/.github/workflows/pretty-check.yml +++ b/.github/workflows/pretty-check.yml @@ -9,9 +9,8 @@ on: types: [opened, reopened, synchronize, ready_for_review] jobs: - check-prettier: + check: if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'force-ci') || contains(github.event.pull_request.labels.*.name, 'force-full-ci') - name: Check Prettier runs-on: ubuntu-latest steps: From 8377c51eb468b08034e2b17a22b46b3deb65fc66 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:07:19 +0100 Subject: [PATCH 29/44] add missing env --- .github/workflows/pretty-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pretty-check.yml b/.github/workflows/pretty-check.yml index 33a4c5cf96a5..fda8a2fccf03 100644 --- a/.github/workflows/pretty-check.yml +++ b/.github/workflows/pretty-check.yml @@ -1,6 +1,7 @@ name: Prettier Check env: + PNPM_VERSION: "9.6.0" NODE_VERSION: "20.16.0" on: @@ -30,7 +31,6 @@ jobs: - name: Install prettier run: pnpm add -g prettier@2.8.8 - - name: Get changed files id: get-changed-files uses: actions/github-script@v7 From 0baef1ef109799cd9b4b67ff31a1468961dafb52 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:07:27 +0100 Subject: [PATCH 30/44] react on comment --- .github/workflows/pretty-fix.yml | 57 ++++++++++++++------------------ 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/.github/workflows/pretty-fix.yml b/.github/workflows/pretty-fix.yml index 6669033ab3ef..c22ecb494063 100644 --- a/.github/workflows/pretty-fix.yml +++ b/.github/workflows/pretty-fix.yml @@ -1,48 +1,41 @@ name: Prettier Fix +env: + PNPM_VERSION: "9.6.0" + NODE_VERSION: "20.16.0" + +permissions: + contents: write + on: - workflow_dispatch: - inputs: - reason: - description: "Reason for manually triggering this workflow" - required: false - schedule: - - cron: "0 0 * * 0" + issue_comment: + types: [created] jobs: - prettier-fix: - permissions: write-all + prettify: runs-on: ubuntu-latest + if: github.event.issue.pull_request && contains(github.event.comment.body, '!prettify') steps: - - uses: actions/checkout@v4 - - name: Set up date environment variables - run: | - echo "BRANCH_TITLE=pretty-fix-$(date +%s)" >> $GITHUB_ENV - echo "PR_TITLE=Prettier Fix - $(date)" >> $GITHUB_ENV + - name: Checkout code + uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20.16.0" + node-version: ${{ env.NODE_VERSION }} - - name: Install dependencies - run: npm i prettier@2.5.1 --save-dev --save-exact + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - - name: Pretty Check - run: npm run pretty-fix + - name: Install prettier + run: pnpm add -g prettier@2.8.8 - - name: Create commits - id: commits - continue-on-error: true - run: | - git config user.name 'monkeytypegeorge' - git config user.email 'monkeytypegeorge@gmail.com' - git add . - git commit -m 'refactor: run prettier' + - name: Run Prettier fix + run: npx prettier --write . - - name: Create pull request - uses: peter-evans/create-pull-request@v4 + - name: Commmit fixes + uses: stefanzweifel/git-auto-commit-action@v5 with: - branch: ${{ env.BRANCH_TITLE }} - title: ${{ env.PR_TITLE }} - body: ${{ env.PR_TITLE }} + commit_message: "prettier fix" \ No newline at end of file From 6c451f5493e88940079d538892807edde112cd73 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:11:30 +0100 Subject: [PATCH 31/44] update --- .../{pretty-fix.yml => pretty-fix-new.yml} | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) rename .github/workflows/{pretty-fix.yml => pretty-fix-new.yml} (51%) diff --git a/.github/workflows/pretty-fix.yml b/.github/workflows/pretty-fix-new.yml similarity index 51% rename from .github/workflows/pretty-fix.yml rename to .github/workflows/pretty-fix-new.yml index c22ecb494063..70c9bb1bc5b7 100644 --- a/.github/workflows/pretty-fix.yml +++ b/.github/workflows/pretty-fix-new.yml @@ -8,13 +8,13 @@ permissions: contents: write on: - issue_comment: - types: [created] + pull_request_target: + types: [labeled] jobs: prettify: runs-on: ubuntu-latest - if: github.event.issue.pull_request && contains(github.event.comment.body, '!prettify') + if: github.event.label.name == 'prettify' steps: - name: Checkout code uses: actions/checkout@v4 @@ -33,9 +33,21 @@ jobs: run: pnpm add -g prettier@2.8.8 - name: Run Prettier fix - run: npx prettier --write . + run: pnpm prettier --write . - - name: Commmit fixes + - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: "prettier fix" \ No newline at end of file + commit_message: "chore: prettier fix" + + - name: Remove prettify label + uses: actions/github-script@v7 + with: + script: | + const { context, github } = require('@actions/github'); + await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: 'prettify' + }); \ No newline at end of file From c0330e2abf77ece00c44ef36ddec463f9cb3788f Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:14:59 +0100 Subject: [PATCH 32/44] rename --- .github/workflows/{pretty-fix-new.yml => pretty-fix.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{pretty-fix-new.yml => pretty-fix.yml} (93%) diff --git a/.github/workflows/pretty-fix-new.yml b/.github/workflows/pretty-fix.yml similarity index 93% rename from .github/workflows/pretty-fix-new.yml rename to .github/workflows/pretty-fix.yml index 70c9bb1bc5b7..a3e6bbfc4be7 100644 --- a/.github/workflows/pretty-fix-new.yml +++ b/.github/workflows/pretty-fix.yml @@ -38,9 +38,9 @@ jobs: - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: "chore: prettier fix" + commit_message: "prettier fix" - - name: Remove prettify label + - name: Remove label uses: actions/github-script@v7 with: script: | From 8586c59a1d9cc5fea4fc9758785006e058047276 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:21:57 +0100 Subject: [PATCH 33/44] remove label --- .github/workflows/pretty-fix.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pretty-fix.yml b/.github/workflows/pretty-fix.yml index a3e6bbfc4be7..8dd6a6a8abf3 100644 --- a/.github/workflows/pretty-fix.yml +++ b/.github/workflows/pretty-fix.yml @@ -41,13 +41,7 @@ jobs: commit_message: "prettier fix" - name: Remove label - uses: actions/github-script@v7 + uses: PauMAVA/add-remove-label-action@v1.0.3 with: - script: | - const { context, github } = require('@actions/github'); - await github.rest.issues.removeLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - name: 'prettify' - }); \ No newline at end of file + issue_number: ${{ github.event.pull_request.number }} + remove: "prettify" From 5d686e3c263d922b316ede2c81fbbad8e2a16cb3 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:24:18 +0100 Subject: [PATCH 34/44] running only on changed files --- .github/workflows/pretty-fix.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pretty-fix.yml b/.github/workflows/pretty-fix.yml index 8dd6a6a8abf3..db9bb2d7dbac 100644 --- a/.github/workflows/pretty-fix.yml +++ b/.github/workflows/pretty-fix.yml @@ -32,8 +32,28 @@ jobs: - name: Install prettier run: pnpm add -g prettier@2.8.8 + - name: Get changed files + id: get-changed-files + uses: actions/github-script@v7 + with: + script: | + const changedFiles = await github.paginate( + github.rest.pulls.listFiles, + { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + } + ); + return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' '); + + - name: Run Prettier fix - run: pnpm prettier --write . + run: | + CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) + if [ -n "$CHANGED_FILES" ]; then + pnpm prettier --write $CHANGED_FILES + fi - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v5 From f747e82901468c236206f027e1b051e08c30a930 Mon Sep 17 00:00:00 2001 From: Miodec <13181393+Miodec@users.noreply.github.com> Date: Thu, 23 Jan 2025 20:33:19 +0000 Subject: [PATCH 35/44] prettier fix --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 62627ac1d14e..374043787817 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -79,7 +79,7 @@ export function clearNotSignedInResult(): void { export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; -notSignedInLastResult.uid = uid; + notSignedInLastResult.uid = uid; //@ts-expect-error delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); From 52d31b7fbe8e1ece91a125a984294da14618fad8 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 23 Jan 2025 21:46:07 +0100 Subject: [PATCH 36/44] test --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 374043787817..62627ac1d14e 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -79,7 +79,7 @@ export function clearNotSignedInResult(): void { export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; - notSignedInLastResult.uid = uid; +notSignedInLastResult.uid = uid; //@ts-expect-error delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); From fa779a3ab68f450ab17ede7422043f111e7b98fb Mon Sep 17 00:00:00 2001 From: Miodec <13181393+Miodec@users.noreply.github.com> Date: Thu, 23 Jan 2025 20:56:08 +0000 Subject: [PATCH 37/44] prettier fix --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 62627ac1d14e..374043787817 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -79,7 +79,7 @@ export function clearNotSignedInResult(): void { export function setNotSignedInUidAndHash(uid: string): void { if (notSignedInLastResult === null) return; -notSignedInLastResult.uid = uid; + notSignedInLastResult.uid = uid; //@ts-expect-error delete notSignedInLastResult.hash; notSignedInLastResult.hash = objectHash(notSignedInLastResult); From 64e5e8a2bdffc1983c5d21b81ccdf1936e0fc90d Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:31:39 +0100 Subject: [PATCH 38/44] ci(pretty fix): use correct head ref --- .github/workflows/pretty-fix.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pretty-fix.yml b/.github/workflows/pretty-fix.yml index db9bb2d7dbac..def9dc63c682 100644 --- a/.github/workflows/pretty-fix.yml +++ b/.github/workflows/pretty-fix.yml @@ -18,6 +18,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} - name: Set up Node.js uses: actions/setup-node@v4 @@ -59,6 +61,7 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "prettier fix" + branch: ${{ github.event.pull_request.head.ref }} - name: Remove label uses: PauMAVA/add-remove-label-action@v1.0.3 From 705a8b3965f7e6c5d69f634c088c8944c6418f1c Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:39:02 +0100 Subject: [PATCH 39/44] ci: use different action for removing label --- .github/workflows/pretty-fix.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pretty-fix.yml b/.github/workflows/pretty-fix.yml index def9dc63c682..035b51322069 100644 --- a/.github/workflows/pretty-fix.yml +++ b/.github/workflows/pretty-fix.yml @@ -64,7 +64,6 @@ jobs: branch: ${{ github.event.pull_request.head.ref }} - name: Remove label - uses: PauMAVA/add-remove-label-action@v1.0.3 + uses: actions-ecosystem/action-remove-labels@v1 with: - issue_number: ${{ github.event.pull_request.number }} - remove: "prettify" + labels: prettify From c157fa819a9a2c931ec0303cccb70c491dae43c1 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:43:51 +0100 Subject: [PATCH 40/44] ci: update permissions --- .github/workflows/pretty-fix.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pretty-fix.yml b/.github/workflows/pretty-fix.yml index 035b51322069..ae7a24605a23 100644 --- a/.github/workflows/pretty-fix.yml +++ b/.github/workflows/pretty-fix.yml @@ -5,7 +5,8 @@ env: NODE_VERSION: "20.16.0" permissions: - contents: write + contents: read + pull-requests: write on: pull_request_target: From 49159196464b1a43eb0b8f81da42da86e1542dce Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 23 Jan 2025 21:54:50 +0100 Subject: [PATCH 41/44] ci: fix permission --- .github/workflows/pretty-fix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pretty-fix.yml b/.github/workflows/pretty-fix.yml index ae7a24605a23..97c349041b1a 100644 --- a/.github/workflows/pretty-fix.yml +++ b/.github/workflows/pretty-fix.yml @@ -5,7 +5,7 @@ env: NODE_VERSION: "20.16.0" permissions: - contents: read + contents: write pull-requests: write on: From 3ccb4f65ee2218e3693915dcd4e53a978574a8a6 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 27 Jan 2025 13:09:24 +0100 Subject: [PATCH 42/44] add concurrency --- .github/workflows/pretty-check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pretty-check.yml b/.github/workflows/pretty-check.yml index fda8a2fccf03..889c4b153704 100644 --- a/.github/workflows/pretty-check.yml +++ b/.github/workflows/pretty-check.yml @@ -9,6 +9,10 @@ on: branches: [master] types: [opened, reopened, synchronize, ready_for_review] +concurrency: + group: group-pretty-check-${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: check: if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'force-ci') || contains(github.event.pull_request.labels.*.name, 'force-full-ci') From ea0afca109cda65ce5b1238ffe7dd251904575d5 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 27 Jan 2025 13:12:11 +0100 Subject: [PATCH 43/44] block ci if workflow changed --- .github/workflows/monkey-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/monkey-ci.yml b/.github/workflows/monkey-ci.yml index b154ebbc0e11..5caddde928e6 100644 --- a/.github/workflows/monkey-ci.yml +++ b/.github/workflows/monkey-ci.yml @@ -55,11 +55,17 @@ jobs: - 'packages/**/*' anti-cheat: - 'backend/**/anticheat/**' + workflows: + - '.github/workflows/**/*' - name: Check Anti-cheat if: steps.filter.outputs.anti-cheat == 'true' run: exit 1 + - name: Check Workflow Changes + if: steps.filter.outputs.workflows == 'true' && !contains(github.event.pull_request.labels.*.name, 'force-ci') && !contains(github.event.pull_request.labels.*.name, 'force-full-ci') + run: exit 1 + - name: Export changes id: export-changes run: | From 6bfadb24602a100904c3aa9e4f360c75d85bab18 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 27 Jan 2025 13:28:01 +0100 Subject: [PATCH 44/44] define perms --- .github/workflows/pretty-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pretty-check.yml b/.github/workflows/pretty-check.yml index 889c4b153704..0f6b59d31a98 100644 --- a/.github/workflows/pretty-check.yml +++ b/.github/workflows/pretty-check.yml @@ -8,6 +8,9 @@ on: pull_request: branches: [master] types: [opened, reopened, synchronize, ready_for_review] + +permissions: + contents: read concurrency: group: group-pretty-check-${{ github.ref }}-${{ github.workflow }}