From 505654dc66dd6c722921409f94e633a177811336 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:11:26 +0100 Subject: [PATCH 01/17] fix(ci): formatter --- .github/workflows/linter.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index eaad49df6..09401d46a 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -109,11 +109,11 @@ jobs: console.log('There was a formatting error, but no comment was given, skipping...'); process.exit(0); } - const prefix = rawCommentText.slice(1, 30); + const prefix = rawCommentText.slice(0, 30); await hidePriorCommentsWithPrefix({ github, context, exec, prefix, resolved: success }); // Create a new comment in case of a new failure if (!success) { - const body = rawCommentText.slice(1, -1).replace(/\\n/g, '\n'); + const body = rawCommentText.replace(/\\n/g, '\n'); await createComment({ github, context, exec, body }); } From 09f414ce8c7f91cfde1cb907b436f645290ec6bf Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:13:28 +0100 Subject: [PATCH 02/17] let's break something --- start-here.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/start-here.mdx b/start-here.mdx index ac87d1b0e..9aa334d6d 100644 --- a/start-here.mdx +++ b/start-here.mdx @@ -8,6 +8,8 @@ import { Image } from "/snippets/image.jsx"; The documentation is organized by layers of detail, with lower-level details appearing later. + + | | | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Ecosystem | Tools and libraries for developing on TON, and how to use them. | From 268a6b1f1ebe3ba5efe494d9075d27e4ab0bd9c3 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:14:29 +0100 Subject: [PATCH 03/17] and something else --- standard/tokens/airdrop.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/standard/tokens/airdrop.mdx b/standard/tokens/airdrop.mdx index 571eaa306..25fb1546e 100644 --- a/standard/tokens/airdrop.mdx +++ b/standard/tokens/airdrop.mdx @@ -5,6 +5,8 @@ title: "Airdrop" import { Aside } from '/snippets/aside.jsx'; import { Image } from '/snippets/image.jsx'; + + ## The problem: distributing at scale You want to reward thousands (or millions) of users. Sending assets to each address proactively looks simple-until you see the bill. Network fees add up fast when the sender pays for every transfer. From 6d926aff9f6cd641c6f46bc87b2f7d55267d174e Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:27:38 +0100 Subject: [PATCH 04/17] trying outputs over env exports --- .github/workflows/linter.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 09401d46a..65afebdb7 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -86,8 +86,12 @@ jobs: '```', ].join('\n'); + // Set outputs for subsequent steps + core.setOutput('comment', comment); + + // NOTE: prev. // Set environment variable for subsequent steps - core.exportVariable('COMMENT', comment); + // core.exportVariable('COMMENT', comment); // Rethrow the exit code of the failed formatting check core.setFailed('Some files are not properly formatted!'); @@ -97,14 +101,13 @@ jobs: - name: Hide prior PR comments and issue a new one in case of failure if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event_name != 'pull_request_target' }} env: - COMMENT: ${{ env.COMMENT }} SUCCESS: ${{ steps.check-fmt.conclusion == 'failure' && 'false' || 'true' }} uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | const { hidePriorCommentsWithPrefix, createComment } = await import('${{ github.workspace }}/.github/scripts/common.mjs'); const success = JSON.parse(process.env.SUCCESS ?? 'false'); - const rawCommentText = process.env.COMMENT ?? ''; + const rawCommentText = '${{ steps.check-fmt.outputs.comment }}' ?? ''; if (!success && rawCommentText === '') { console.log('There was a formatting error, but no comment was given, skipping...'); process.exit(0); From b4c31680c69848470ab546ec2ca8836551b444ad Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:31:10 +0100 Subject: [PATCH 05/17] log it out --- .github/workflows/linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 65afebdb7..5612e5c7b 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -61,6 +61,7 @@ jobs: process.exit(0); } console.log('\nChecking formatting of the following MDX and Markdown files affected by this PR:\n'); + console.log(files); // TMP for (const file of files) { console.log(`- ${file}`); } From c5c989a4b51268f03bb3b3ec45859e447f1ca559 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:33:20 +0100 Subject: [PATCH 06/17] more logging --- .github/workflows/linter.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 5612e5c7b..5fed89643 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -55,13 +55,16 @@ jobs: uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | + console.log(process.env.ALL_CHANGED_FILES); + console.log(process.env.ALL_CHANGED_FILES.trim()); + console.log(process.env.ALL_CHANGED_FILES.trim().split(':')); const files = (process.env.ALL_CHANGED_FILES ?? '').trim().split(':').filter(Boolean); + console.log(files); // TMP if (files.length === 0) { console.log('\nNo such files affected!'); process.exit(0); } console.log('\nChecking formatting of the following MDX and Markdown files affected by this PR:\n'); - console.log(files); // TMP for (const file of files) { console.log(`- ${file}`); } From 48f691f1fa0dfdbfdbe32f304e7af37144627265 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:34:58 +0100 Subject: [PATCH 07/17] what if it's a comma --- .github/workflows/linter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 5fed89643..fc4390d0b 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -46,7 +46,8 @@ jobs: files: | **.md **.mdx - separator: ":" + separator: "," + # separator: ":" - name: Check formatting of MDX and Markdown files id: check-fmt From 82dd7b0b3d6e49da0c647ca8ad0049dff47b28e6 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:39:23 +0100 Subject: [PATCH 08/17] move back to :, but now process outputs directly, without an `env` var --- .github/workflows/linter.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index fc4390d0b..51973527b 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -46,20 +46,21 @@ jobs: files: | **.md **.mdx - separator: "," - # separator: ":" + separator: ":" + # separator: "," - name: Check formatting of MDX and Markdown files id: check-fmt - env: - ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + # env: + # ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | - console.log(process.env.ALL_CHANGED_FILES); - console.log(process.env.ALL_CHANGED_FILES.trim()); - console.log(process.env.ALL_CHANGED_FILES.trim().split(':')); - const files = (process.env.ALL_CHANGED_FILES ?? '').trim().split(':').filter(Boolean); + const files = ('${{ steps.changed-files.outputs.all_changed_files }}').trim().split(':').filter(Boolean); + // console.log(process.env.ALL_CHANGED_FILES); + // console.log(process.env.ALL_CHANGED_FILES.trim()); + // console.log(process.env.ALL_CHANGED_FILES.trim().split(':')); + // const files = (process.env.ALL_CHANGED_FILES ?? '').trim().split(':').filter(Boolean); console.log(files); // TMP if (files.length === 0) { console.log('\nNo such files affected!'); From 6ffd3ba0a29d404eedaad5a20d67205334641071 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:49:41 +0100 Subject: [PATCH 09/17] really push it --- .github/workflows/linter.yml | 20 +++----------------- file with spaces.mdx | 14 ++++++++++++++ file:.mdx | 10 ++++++++++ 3 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 file with spaces.mdx create mode 100644 file:.mdx diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 51973527b..1b16c210f 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -47,21 +47,13 @@ jobs: **.md **.mdx separator: ":" - # separator: "," - name: Check formatting of MDX and Markdown files id: check-fmt - # env: - # ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | - const files = ('${{ steps.changed-files.outputs.all_changed_files }}').trim().split(':').filter(Boolean); - // console.log(process.env.ALL_CHANGED_FILES); - // console.log(process.env.ALL_CHANGED_FILES.trim()); - // console.log(process.env.ALL_CHANGED_FILES.trim().split(':')); - // const files = (process.env.ALL_CHANGED_FILES ?? '').trim().split(':').filter(Boolean); - console.log(files); // TMP + const files = ("${{ steps.changed-files.outputs.all_changed_files || '' }}").trim().split(':').filter(Boolean); if (files.length === 0) { console.log('\nNo such files affected!'); process.exit(0); @@ -95,10 +87,6 @@ jobs: // Set outputs for subsequent steps core.setOutput('comment', comment); - // NOTE: prev. - // Set environment variable for subsequent steps - // core.exportVariable('COMMENT', comment); - // Rethrow the exit code of the failed formatting check core.setFailed('Some files are not properly formatted!'); process.exit(1); @@ -106,14 +94,12 @@ jobs: - name: Hide prior PR comments and issue a new one in case of failure if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event_name != 'pull_request_target' }} - env: - SUCCESS: ${{ steps.check-fmt.conclusion == 'failure' && 'false' || 'true' }} uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | const { hidePriorCommentsWithPrefix, createComment } = await import('${{ github.workspace }}/.github/scripts/common.mjs'); - const success = JSON.parse(process.env.SUCCESS ?? 'false'); - const rawCommentText = '${{ steps.check-fmt.outputs.comment }}' ?? ''; + const success = JSON.parse("${{ steps.check-fmt.conclusion == 'failure' && 'false' || 'true' }}"); + const rawCommentText = "${{ steps.check-fmt.outputs.comment || '' }}" ?? ''; if (!success && rawCommentText === '') { console.log('There was a formatting error, but no comment was given, skipping...'); process.exit(0); diff --git a/file with spaces.mdx b/file with spaces.mdx new file mode 100644 index 000000000..8fe1a5f2e --- /dev/null +++ b/file with spaces.mdx @@ -0,0 +1,14 @@ +--- +title: "Hey, I'm a file with spaces!" +--- + +Too much spaces... + + + + + + + + + diff --git a/file:.mdx b/file:.mdx new file mode 100644 index 000000000..a72eac8ab --- /dev/null +++ b/file:.mdx @@ -0,0 +1,10 @@ +--- +title: "File with : inside" +--- + +Ok, that's not funny + + + + + From 3784094a0c704ea5fe84988aa143f4ecc9603ac7 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:03:42 +0100 Subject: [PATCH 10/17] 1 --- .github/workflows/linter.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 1b16c210f..540e92916 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -53,7 +53,11 @@ jobs: uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | - const files = ("${{ steps.changed-files.outputs.all_changed_files || '' }}").trim().split(':').filter(Boolean); + // NOTE: Previously, all_changed_files were processed as an env, + // which lead to unwanted escapes being added for Bash envs + const files = ("${{ steps.changed-files.outputs.all_changed_files }}").trim().split(':').filter(Boolean); + // NOTE: Which is why the comment should also be set via outputs, not an env + core.setOutput('comment', ''); if (files.length === 0) { console.log('\nNo such files affected!'); process.exit(0); @@ -94,12 +98,15 @@ jobs: - name: Hide prior PR comments and issue a new one in case of failure if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event_name != 'pull_request_target' }} + env: + # NOTE: Do not set the comment from the outputs here, as that will introduce extra escape characters + SUCCESS: ${{ steps.check-fmt.conclusion == 'failure' && 'false' || 'true' }} uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | const { hidePriorCommentsWithPrefix, createComment } = await import('${{ github.workspace }}/.github/scripts/common.mjs'); - const success = JSON.parse("${{ steps.check-fmt.conclusion == 'failure' && 'false' || 'true' }}"); - const rawCommentText = "${{ steps.check-fmt.outputs.comment || '' }}" ?? ''; + const success = JSON.parse(process.env.SUCCESS ?? 'false'); + const rawCommentText = "${{ steps.check-fmt.outputs.comment }}"; if (!success && rawCommentText === '') { console.log('There was a formatting error, but no comment was given, skipping...'); process.exit(0); From 33a250564ef463e43be83efdcf8515f9070b7258 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:09:34 +0100 Subject: [PATCH 11/17] 1 --- file:.mdx | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 file:.mdx diff --git a/file:.mdx b/file:.mdx deleted file mode 100644 index a72eac8ab..000000000 --- a/file:.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "File with : inside" ---- - -Ok, that's not funny - - - - - From d86e00c1d176484f2c3a17c4d20a2e66bb2efad1 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:34:45 +0100 Subject: [PATCH 12/17] less brittle --- .github/workflows/linter.yml | 49 +++++++++++++++++------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 540e92916..6aebd485a 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -53,11 +53,9 @@ jobs: uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | - // NOTE: Previously, all_changed_files were processed as an env, + // NOTE: Previously, all_changed_files were processed as an `env`, // which lead to unwanted escapes being added for Bash envs const files = ("${{ steps.changed-files.outputs.all_changed_files }}").trim().split(':').filter(Boolean); - // NOTE: Which is why the comment should also be set via outputs, not an env - core.setOutput('comment', ''); if (files.length === 0) { console.log('\nNo such files affected!'); process.exit(0); @@ -78,26 +76,19 @@ jobs: console.log('1. Install necessary dependencies: \x1b[31mnpm ci\x1b[0m'); console.log(`2. Run this command to fix the issues: \x1b[31mnpm run fmt:some -- ${filesJoined}\x1b[0m`); - // Prepare a comment on the PR - const comment = [ - 'To fix the **formatting** issues:\n', - '1. Install necessary dependencises: `npm ci`', - '2. Then, run this command:', - '```shell', - `npm run fmt:some -- ${filesJoined}`, - '```', - ].join('\n'); - - // Set outputs for subsequent steps - core.setOutput('comment', comment); - // Rethrow the exit code of the failed formatting check core.setFailed('Some files are not properly formatted!'); process.exit(1); } - name: Hide prior PR comments and issue a new one in case of failure - if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event_name != 'pull_request_target' }} + if: | + ( + !cancelled() && + steps.changed-files.conclusion == 'success' && + github.event_name == 'pull_request' && + github.event_name != 'pull_request_target' + ) env: # NOTE: Do not set the comment from the outputs here, as that will introduce extra escape characters SUCCESS: ${{ steps.check-fmt.conclusion == 'failure' && 'false' || 'true' }} @@ -106,17 +97,23 @@ jobs: script: | const { hidePriorCommentsWithPrefix, createComment } = await import('${{ github.workspace }}/.github/scripts/common.mjs'); const success = JSON.parse(process.env.SUCCESS ?? 'false'); - const rawCommentText = "${{ steps.check-fmt.outputs.comment }}"; - if (!success && rawCommentText === '') { - console.log('There was a formatting error, but no comment was given, skipping...'); - process.exit(0); - } - const prefix = rawCommentText.slice(0, 30); + // NOTE: Previously, all_changed_files were processed as an `env`, + // which lead to unwanted escapes being added for Bash envs + const files = ("${{ steps.changed-files.outputs.all_changed_files }}").trim().split(':').filter(Boolean); + const comment = [ + 'To fix the **formatting** issues:\n', + '1. Install necessary dependencises: `npm ci`', + '2. Then, run this command:', + '```shell', + `npm run fmt:some -- ${files.map((it) => '"' + it + '"').join(' ')}`, + '```', + ].join('\n'); + const prefix = comment.slice(0, 30); await hidePriorCommentsWithPrefix({ github, context, exec, prefix, resolved: success }); - // Create a new comment in case of a new failure + // Create a new PR comment in case of a new failure if (!success) { - const body = rawCommentText.replace(/\\n/g, '\n'); - await createComment({ github, context, exec, body }); + // const body = comment.replace(/\\n/g, '\n'); + await createComment({ github, context, exec, body: comment }); } spell-check: From fa34b78f9aaddfe82e29b3af720299a8421e71f5 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:36:16 +0100 Subject: [PATCH 13/17] 1 --- file with spaces.mdx | 9 --------- standard/tokens/airdrop.mdx | 2 -- start-here.mdx | 2 -- 3 files changed, 13 deletions(-) diff --git a/file with spaces.mdx b/file with spaces.mdx index 8fe1a5f2e..4054ac6a2 100644 --- a/file with spaces.mdx +++ b/file with spaces.mdx @@ -3,12 +3,3 @@ title: "Hey, I'm a file with spaces!" --- Too much spaces... - - - - - - - - - diff --git a/standard/tokens/airdrop.mdx b/standard/tokens/airdrop.mdx index 25fb1546e..571eaa306 100644 --- a/standard/tokens/airdrop.mdx +++ b/standard/tokens/airdrop.mdx @@ -5,8 +5,6 @@ title: "Airdrop" import { Aside } from '/snippets/aside.jsx'; import { Image } from '/snippets/image.jsx'; - - ## The problem: distributing at scale You want to reward thousands (or millions) of users. Sending assets to each address proactively looks simple-until you see the bill. Network fees add up fast when the sender pays for every transfer. diff --git a/start-here.mdx b/start-here.mdx index 9aa334d6d..ac87d1b0e 100644 --- a/start-here.mdx +++ b/start-here.mdx @@ -8,8 +8,6 @@ import { Image } from "/snippets/image.jsx"; The documentation is organized by layers of detail, with lower-level details appearing later. - - | | | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Ecosystem | Tools and libraries for developing on TON, and how to use them. | From 4d489f348b581b59129d83efa38fd367db76093b Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:38:15 +0100 Subject: [PATCH 14/17] why --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 6aebd485a..3dd815f3a 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -67,7 +67,7 @@ jobs: const filesQuoted = files.map((it) => '"' + it + '"'); try { await exec.exec('npm', ['run', 'check:fmt:some', '--', ...filesQuoted], { - silent: true, // >/dev/null 2>&1 + // silent: true, // >/dev/null 2>&1 }); } catch (_) { // Comment right in the actions output From 648b2166a267e8b9358d1e7b36ca60dd9a19476e Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:44:30 +0100 Subject: [PATCH 15/17] filenames with spaces is one of the unsolved CS problems, apparently --- .github/workflows/linter.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 3dd815f3a..5675e5a9c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -50,12 +50,13 @@ jobs: - name: Check formatting of MDX and Markdown files id: check-fmt + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | - // NOTE: Previously, all_changed_files were processed as an `env`, - // which lead to unwanted escapes being added for Bash envs - const files = ("${{ steps.changed-files.outputs.all_changed_files }}").trim().split(':').filter(Boolean); + const files = (process.env.ALL_CHANGED_FILES ?? '') + .trim().replace('\\', '').split(':').filter(Boolean); if (files.length === 0) { console.log('\nNo such files affected!'); process.exit(0); @@ -67,7 +68,7 @@ jobs: const filesQuoted = files.map((it) => '"' + it + '"'); try { await exec.exec('npm', ['run', 'check:fmt:some', '--', ...filesQuoted], { - // silent: true, // >/dev/null 2>&1 + silent: true, // >/dev/null 2>&1 }); } catch (_) { // Comment right in the actions output @@ -90,16 +91,15 @@ jobs: github.event_name != 'pull_request_target' ) env: - # NOTE: Do not set the comment from the outputs here, as that will introduce extra escape characters + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} SUCCESS: ${{ steps.check-fmt.conclusion == 'failure' && 'false' || 'true' }} uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | const { hidePriorCommentsWithPrefix, createComment } = await import('${{ github.workspace }}/.github/scripts/common.mjs'); const success = JSON.parse(process.env.SUCCESS ?? 'false'); - // NOTE: Previously, all_changed_files were processed as an `env`, - // which lead to unwanted escapes being added for Bash envs - const files = ("${{ steps.changed-files.outputs.all_changed_files }}").trim().split(':').filter(Boolean); + const files = (process.env.ALL_CHANGED_FILES ?? '') + .trim().replace('\\', '').split(':').filter(Boolean); const comment = [ 'To fix the **formatting** issues:\n', '1. Install necessary dependencises: `npm ci`', From 89557daa6e9860d0619c2cfbfdc7af82594f2687 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:55:06 +0100 Subject: [PATCH 16/17] 1 --- .github/workflows/linter.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 5675e5a9c..d1b6372ae 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -63,7 +63,10 @@ jobs: } console.log('\nChecking formatting of the following MDX and Markdown files affected by this PR:\n'); for (const file of files) { - console.log(`- ${file}`); + const notice = file.includes(' ') + ? ' (filename contains spaces, please remove them!)' + : ''; + console.log(`- ${file}${notice}`); } const filesQuoted = files.map((it) => '"' + it + '"'); try { @@ -112,7 +115,6 @@ jobs: await hidePriorCommentsWithPrefix({ github, context, exec, prefix, resolved: success }); // Create a new PR comment in case of a new failure if (!success) { - // const body = comment.replace(/\\n/g, '\n'); await createComment({ github, context, exec, body: comment }); } From accb55e1170b5a1fba0be7b10f2e076b1bbfd232 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:57:27 +0100 Subject: [PATCH 17/17] k --- file with spaces.mdx | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 file with spaces.mdx diff --git a/file with spaces.mdx b/file with spaces.mdx deleted file mode 100644 index 4054ac6a2..000000000 --- a/file with spaces.mdx +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Hey, I'm a file with spaces!" ---- - -Too much spaces...