From cea205c9b1374454530d025ccbb2ef80c5608d8c Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sat, 24 Feb 2024 15:16:34 +0100 Subject: [PATCH 1/3] infra(ci): highlight preflight diff errors in github --- .github/workflows/pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6b9138306e2..14aea7a3643 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -46,7 +46,8 @@ jobs: id: diff run: | git add . - git diff --cached --exit-code + git diff --cached --name-only | sed -E 's/^(.*)$/::error file=\1,title=Diff detected::Please run `pnpm run preflight` and commit the changes./' + git diff --cached --name-only --exit-code continue-on-error: true - name: Transpile ts From 881ebf52b93363a4fa84b1fec5dfbc7695cf6cac Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sat, 24 Feb 2024 15:18:38 +0100 Subject: [PATCH 2/3] test: introduce a diff --- test/modules/__snapshots__/airline.spec.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/modules/__snapshots__/airline.spec.ts.snap b/test/modules/__snapshots__/airline.spec.ts.snap index 0615a83999f..9d26537e654 100644 --- a/test/modules/__snapshots__/airline.spec.ts.snap +++ b/test/modules/__snapshots__/airline.spec.ts.snap @@ -4,7 +4,7 @@ exports[`airline > 42 > aircraftType 1`] = `"regional"`; exports[`airline > 42 > airline 1`] = ` { - "iataCode": "ET", + "iataCode": "", "name": "Ethiopian Airlines", } `; From d609c4fc7520e1c332c5c398d5c5aa8fa634bd42 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sat, 24 Feb 2024 15:25:05 +0100 Subject: [PATCH 3/3] Revert "test: introduce a diff" This reverts commit 881ebf52b93363a4fa84b1fec5dfbc7695cf6cac. --- test/modules/__snapshots__/airline.spec.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/modules/__snapshots__/airline.spec.ts.snap b/test/modules/__snapshots__/airline.spec.ts.snap index 9d26537e654..0615a83999f 100644 --- a/test/modules/__snapshots__/airline.spec.ts.snap +++ b/test/modules/__snapshots__/airline.spec.ts.snap @@ -4,7 +4,7 @@ exports[`airline > 42 > aircraftType 1`] = `"regional"`; exports[`airline > 42 > airline 1`] = ` { - "iataCode": "", + "iataCode": "ET", "name": "Ethiopian Airlines", } `;