File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,12 @@ source virtualenv/bin/activate
1212uv pip install pyright
1313
1414cd src/${GITHUB_REPOSITORY##*/ }
15+ git fetch --unshallow || true
16+ git fetch origin master:master || true
1517HEAD_REV=" $( git rev-parse HEAD) "
1618if [[ $GITHUB_REF == " master" ]]; then
1719 BASE_REV=" $( git rev-parse --abbrev-ref HEAD~) "
1820else
19- git fetch origin master:master || true
2021 BASE_REV=" $( git rev-parse --abbrev-ref master) "
2122fi
2223
Original file line number Diff line number Diff line change @@ -45,11 +45,12 @@ def compare_lint():
4545 repo_name = os .path .basename (repo_dir )
4646
4747 os .chdir (repo_dir )
48+ subprocess .call ("git fetch --unshallow" .split ())
49+ subprocess .call ("git fetch origin master" .split ())
4850 cur_branch = subprocess .check_output ("git rev-parse --abbrev-ref HEAD" .split ()).decode ().strip ()
4951 if cur_branch == "master" :
5052 compare_ref = 'HEAD^'
5153 else :
52- subprocess .call ("git fetch origin master" .split ())
5354 compare_ref = subprocess .check_output ("git merge-base origin/master {}" .format (cur_branch ).split ()).decode ()
5455
5556 # get the files to lint
You can’t perform that action at this time.
0 commit comments