From d9672968d43918a1b825e30e348c873d0f392979 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 16 Apr 2026 15:23:21 +0900 Subject: [PATCH] Use exact ref path and --exit-code for git ls-remote tag check --- .github/scripts/update_dependency_changes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/update_dependency_changes.py b/.github/scripts/update_dependency_changes.py index 060e945486..0f47d97d5f 100644 --- a/.github/scripts/update_dependency_changes.py +++ b/.github/scripts/update_dependency_changes.py @@ -28,11 +28,11 @@ def normalize_version(version): def check_tag_exists(tag): """Check if a git tag exists on the remote.""" result = subprocess.run( - ["git", "ls-remote", "--tags", "origin", tag], + ["git", "ls-remote", "--exit-code", "--tags", "origin", f"refs/tags/{tag}"], capture_output=True, text=True, ) - return result.returncode == 0 and result.stdout.strip() != "" + return result.returncode == 0 def bump_patch_if_released(version, tag_exists_fn=None):