File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 6767      run : echo "HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV 
6868    - name : Set base sha (pull) 
6969      if : github.event_name == 'pull_request' 
70-       run : | 
71-         git fetch --no-tags --no-recurse-submodules --depth=$((DEPTH + 1)) origin $HEAD_SHA 
72-         echo "BASE_SHA=$(git rev-list $HEAD_SHA --skip=$DEPTH --max-count=1)" >> $GITHUB_ENV 
70+       run : git cat-file -e $SHA && echo "BASE_SHA=$SHA" >> $GITHUB_ENV || true 
7371      env :
74-         DEPTH : ${{ steps.get-last-commit-with-checks.outputs.commit_depth  || github.event.pull_request.commits  }} 
72+         SHA : ${{ steps.get-last-commit-with-checks.outputs.commit_sha  || github.event.pull_request.base.sha  }} 
7573    - name : Set head sha (push) 
7674      if : github.event_name == 'push' 
7775      run : echo "HEAD_SHA=${{ github.event.after }}" >> $GITHUB_ENV 
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def git_diff(pattern: str):
8989    print ("Using files list by computing diff" )
9090    changed_files  =  git_diff ("$BASE_SHA...$HEAD_SHA" )
9191    if  os .environ .get ("GITHUB_EVENT_NAME" ) ==  "pull_request" :
92-         changed_files .intersection_update (git_diff ("$HEAD_SHA ~...$HEAD_SHA " ))
92+         changed_files .intersection_update (git_diff ("$GITHUB_SHA ~...$GITHUB_SHA " ))
9393else :
9494    print ("Using files list in CHANGED_FILES" )
9595    changed_files  =  set (json .loads (os .environ .get ("CHANGED_FILES" ) or  "[]" ))
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments