@@ -62,10 +62,10 @@ def _get_changed_files(self, base_ref: Optional[str] = None) -> List[str]:
62
62
pr_head = os .environ .get ('GITHUB_HEAD_HEAD' ) # PRs
63
63
branch = os .environ .get ('GITHUB_REF_NAME' ) # pushes
64
64
65
- # For maintenance branches (cherry-picks), always use single commit diff
65
+ # For maintenance branches (cherry-picks), always use git show HEAD regardless of base_ref
66
66
if branch and branch .endswith ('.x' ):
67
- # Maintenance branch - cherry-picks are always single commits
68
- cmd = ["git" , "diff " , "--name-only" , "HEAD~1.. HEAD" ]
67
+ # Maintenance branch - cherry-picks are single commits, just get files in this commit
68
+ cmd = ["git" , "show " , "--name-only" , "--format=" , " HEAD" ]
69
69
elif base_ref :
70
70
# Explicit base reference provided - use two-dot diff for direct comparison
71
71
cmd = ["git" , "diff" , "--name-only" , f"{ base_ref } ..HEAD" ]
@@ -180,7 +180,7 @@ def _detect_default_base(self) -> str:
180
180
181
181
# Show the actual strategy being used
182
182
if branch and branch .endswith ('.x' ):
183
- return f"HEAD~1 (single commit - maintenance branch { branch } )"
183
+ return f"git show HEAD ( maintenance branch { branch } )"
184
184
elif pr_base :
185
185
return f"origin/{ pr_base } (PR base)"
186
186
elif branch :
0 commit comments