Skip to content

Commit

Permalink
ci/ci_commit_formatting_run: Ensure checks work on older branches.
Browse files Browse the repository at this point in the history
  • Loading branch information
pi-anl committed Oct 10, 2023
1 parent 699477d commit 94fd52d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ function ci_code_formatting_run {

function ci_commit_formatting_run {
git remote add upstream https://github.com/micropython/micropython.git
git fetch --depth=100 upstream master
# For a PR, upstream/master..HEAD ends with a merge commit into master, exlude that one.
git fetch --depth=100 upstream master
# If the common ancestor commit hasn't been found, fetch more
git merge-base upstream/master HEAD || git fetch --unshallow upstream master
# For a PR, upstream/master..HEAD ends with a merge commit into master, exclude that one.
tools/verifygitlog.py -v upstream/master..HEAD --no-merges
}

Expand All @@ -53,6 +55,8 @@ function ci_code_size_build {
git checkout -b pull_request # save the current location
git remote add upstream https://github.com/micropython/micropython.git
git fetch --depth=100 upstream master
# If the common ancestor commit hasn't been found, fetch more
git merge-base upstream/master HEAD || git fetch --unshallow upstream master
# build reference, save to size0
# ignore any errors with this build, in case master is failing
git checkout `git merge-base --fork-point upstream/master pull_request`
Expand Down

0 comments on commit 94fd52d

Please sign in to comment.