From 8772e25d919eb6234e4f0abcc6afce71e6955d74 Mon Sep 17 00:00:00 2001 From: Patrick Lewis <4015312+locus313@users.noreply.github.com> Date: Wed, 5 Aug 2026 12:42:31 -0700 Subject: [PATCH] refactor: extract csv_escape helper to lib/github-common.sh Deduplicates the 'sed s/"/""/g' CSV double-quote escaping pattern that was hand-rolled 8 times across github-dockerfile-discovery.sh (6 call sites), github-get-repo-list.sh, and github-archive-old-repos.sh into a single shared csv_escape helper, documented in the shared library docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 1 + AGENTS.md | 2 +- README.md | 1 + .../github-dockerfile-discovery.sh | 12 ++++++------ lib/github-common.sh | 10 ++++++++++ .../github-archive-old-repos.sh | 2 +- .../github-get-repo-list/github-get-repo-list.sh | 2 +- tests/test_common.bats | 14 ++++++++++++++ 8 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 498742d..39099f7 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -33,6 +33,7 @@ Provides reusable helpers sourced by scripts: | `validate_github_token [bearer]` | Verify GITHUB_TOKEN via /user endpoint | | `validate_slug