From f1687f402b4624e62e88d5652fd35f914078f06e Mon Sep 17 00:00:00 2001 From: Feng Ruohang Date: Mon, 7 Sep 2026 11:49:23 +0800 Subject: [PATCH] fix: scope rebrand checks to the retired repository Match the exact retired repository while preserving links to distinct repositories and historical issue titles in contributor credits. Continue rejecting live links to the retired repository in those credits. Signed-off-by: Feng Ruohang --- buildscripts/verify-rebrand.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/buildscripts/verify-rebrand.sh b/buildscripts/verify-rebrand.sh index 91e9e7c2d..47c85104f 100755 --- a/buildscripts/verify-rebrand.sh +++ b/buildscripts/verify-rebrand.sh @@ -159,11 +159,13 @@ fi # The repository and its default branch are pgsty/silo and main. The invariant # is that the old name is never a live target, not that it is never spoken: the # READMEs have to name it to explain the rename and to point at the archived -# artifacts, which is the opposite of stranding a reader on it. +# artifacts, which is the opposite of stranding a reader on it. CONTRIBUTORS.md +# also quotes historical issue titles. # # So two rules. First, no live URL may resolve to the old repository anywhere, -# READMEs included. -stale_repo_url="$(rg -n -e 'github\.com/pgsty/minio' -e 'hub\.docker\.com/r/pgsty/minio' \ +# READMEs and CONTRIBUTORS.md included. +old_repo_pattern='pgsty/minio(\.git)?([^[:alnum:]_.-]|$)' +stale_repo_url="$(rg -n -e "github\.com/${old_repo_pattern}" -e "hub\.docker\.com/r/${old_repo_pattern}" \ --glob '!.git/**' --glob '!dist/**' \ --glob '!SILO_REBRANDING_MIGRATION.md' \ --glob '!buildscripts/rebrand-guard/compat-baseline.json' . | @@ -175,10 +177,10 @@ fi # Second, the bare name may only appear where it is deliberate: the pinned # pre-rebrand image digest in the upgrade test, the two guards that refuse a -# legacy image, and the two READMEs that document the rename and the archived -# minio branch. -repo_guard_allowlist='^(buildscripts/minio-upgrade\.sh|buildscripts/verify-rebrand\.sh|buildscripts/helm-migration-guard/main\.go|README\.md|README_ZH\.md):' -stale_repo="$(rg -n 'pgsty/minio' --glob '!.git/**' --glob '!dist/**' \ +# legacy image, the two READMEs that document the rename and the archived +# minio branch, and historical issue titles in CONTRIBUTORS.md. +repo_guard_allowlist='^(buildscripts/minio-upgrade\.sh|buildscripts/verify-rebrand\.sh|buildscripts/helm-migration-guard/main\.go|README\.md|README_ZH\.md|CONTRIBUTORS\.md):' +stale_repo="$(rg -n "${old_repo_pattern}" --glob '!.git/**' --glob '!dist/**' \ --glob '!SILO_REBRANDING_MIGRATION.md' \ --glob '!buildscripts/rebrand-guard/compat-baseline.json' . | sed 's#^\./##' | grep -Ev "${repo_guard_allowlist}" || true)"