Created
October 25, 2025 22:37
-
-
Save patcon/cb4982dd771f3ba569b21ecafe722eef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 7d0abec3f8ce5a141412be6da2e4f538fca0b154 Mon Sep 17 00:00:00 2001 | |
| From: Patrick Connolly <[email protected]> | |
| Date: Mon, 2 Jun 2025 23:53:10 -0400 | |
| Subject: [PATCH] Add is-meta back into comments.csv export. | |
| --- | |
| server/__tests__/integration/data-export.test.ts | 3 ++- | |
| server/src/routes/export.ts | 1 + | |
| 2 files changed, 3 insertions(+), 1 deletion(-) | |
| diff --git a/server/__tests__/integration/data-export.test.ts b/server/__tests__/integration/data-export.test.ts | |
| index e53f981c..8abbe562 100644 | |
| --- a/server/__tests__/integration/data-export.test.ts | |
| +++ b/server/__tests__/integration/data-export.test.ts | |
| @@ -95,6 +95,7 @@ describe('Data Export API', () => { | |
| expect(response.text).toContain('agrees'); | |
| expect(response.text).toContain('disagrees'); | |
| expect(response.text).toContain('moderated'); | |
| + expect(response.text).toContain('is-meta'); | |
| expect(response.text).toContain('comment-body'); | |
| // Should contain all our test comments | |
| @@ -134,4 +135,4 @@ describe('Data Export API', () => { | |
| expect(response.status).toBe(400); | |
| expect(response.text).toContain('polis_err_param_parse_failed_report_id'); | |
| }); | |
| -}); | |
| \ No newline at end of file | |
| +}); | |
| diff --git a/server/src/routes/export.ts b/server/src/routes/export.ts | |
| index 9b8eff97..f921b0e8 100644 | |
| --- a/server/src/routes/export.ts | |
| +++ b/server/src/routes/export.ts | |
| @@ -220,6 +220,7 @@ export async function sendCommentSummary(zid: number, res: Response) { | |
| agrees: (row) => String(row.agrees), | |
| disagrees: (row) => String(row.disagrees), | |
| moderated: (row) => String(row.mod), | |
| + "is-meta": (row) => String(row.is_meta), | |
| "comment-body": (row) => formatEscapedText(row.txt), | |
| }, | |
| commentRows | |
| -- | |
| 2.46.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment