Skip to content

Commit f80a71c

Browse files
committed
fix: prioritize maintenance branch detection over explicit base_ref
- Ensure maintenance branches (.x) always use 'git show HEAD' - Prevents fallback to git diff strategies that fail with shallow checkouts - Fixes issue where --base parameter overrode maintenance branch logic
1 parent 13c8084 commit f80a71c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/scripts/test_discovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _get_changed_files(self, base_ref: Optional[str] = None) -> List[str]:
6262
pr_head = os.environ.get('GITHUB_HEAD_HEAD') # PRs
6363
branch = os.environ.get('GITHUB_REF_NAME') # pushes
6464

65-
# For maintenance branches (cherry-picks), get files from the commit itself
65+
# For maintenance branches (cherry-picks), always use git show HEAD regardless of base_ref
6666
if branch and branch.endswith('.x'):
6767
# Maintenance branch - cherry-picks are single commits, just get files in this commit
6868
cmd = ["git", "show", "--name-only", "--format=", "HEAD"]

0 commit comments

Comments
 (0)