@@ -62,10 +62,10 @@ 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), always use single commit diff
65+ # For maintenance branches (cherry-picks), always use git show HEAD regardless of base_ref
6666 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" ]
6969 elif base_ref :
7070 # Explicit base reference provided - use two-dot diff for direct comparison
7171 cmd = ["git" , "diff" , "--name-only" , f"{ base_ref } ..HEAD" ]
@@ -180,7 +180,7 @@ def _detect_default_base(self) -> str:
180180
181181 # Show the actual strategy being used
182182 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 } )"
184184 elif pr_base :
185185 return f"origin/{ pr_base } (PR base)"
186186 elif branch :
0 commit comments