File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1616 uses : actions/checkout@v3
1717 with :
1818 fetch-depth : 0
19- # This is crucial - explicitly tell it to get all branches
2019 ref : master
2120
2221 - name : Set Git Identity
@@ -28,12 +27,11 @@ jobs:
2827 env :
2928 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3029 run : |
31- # Ensure we have the latest from both branches
32- git fetch origin master:master
33- git fetch origin main:main
30+ # We're already on master, just need to fetch main
31+ git fetch origin main:refs/remotes/origin/main
3432
3533 # Check if there are differences between main and master
36- DIFF_COUNT=$(git rev-list --count main..master )
34+ DIFF_COUNT=$(git rev-list --count origin/ main..HEAD )
3735
3836 if [ "$DIFF_COUNT" -gt 0 ]; then
3937 echo "Differences found between main and master. Creating PR..."
You can’t perform that action at this time.
0 commit comments