From 9dc06b8056da29a5d75b1c88bfb8c493f911e176 Mon Sep 17 00:00:00 2001 From: Patrick Lewis <4015312+locus313@users.noreply.github.com> Date: Tue, 4 Aug 2026 19:26:07 -0700 Subject: [PATCH] refactor: extract is_bsd_date helper to lib/github-common.sh Deduplicates the BSD-vs-GNU date detection probe that was repeated across github-archive-old-repos.sh (2 call sites) and github-copilot-budget-advisor.sh (1 call site) into a single shared helper, and documents it 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 + lib/github-common.sh | 10 ++++++++++ .../github-archive-old-repos.sh | 4 ++-- .../github-copilot-budget-advisor.sh | 2 +- tests/test_common.bats | 11 +++++++++++ 7 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index ee934a6..498742d 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -32,6 +32,7 @@ Provides reusable helpers sourced by scripts: | `configure_gh_auth [scope_hint]` | Bridge GITHUB_TOKEN→GH_TOKEN or verify gh auth session | | `validate_github_token [bearer]` | Verify GITHUB_TOKEN via /user endpoint | | `validate_slug