Skip to content

Commit

Permalink
[mypy_primer] use merge base as base commit (#11627)
Browse files Browse the repository at this point in the history
Solves hauntsaninja/mypy_primer#21

Co-authored-by: hauntsaninja <>
  • Loading branch information
hauntsaninja committed Nov 27, 2021
1 parent ffb1bac commit 578d389
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/mypy_primer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ jobs:
cd mypy_to_test
echo "new commit"
git rev-list --format=%s --max-count=1 $GITHUB_SHA
git checkout -b upstream_master origin/master
MERGE_BASE=$(git merge-base $GITHUB_SHA origin/master)
git checkout -b base_commit $MERGE_BASE
echo "base commit"
git rev-list --format=%s --max-count=1 upstream_master
git rev-list --format=%s --max-count=1 base_commit
echo ''
cd ..
# fail action if exit code isn't zero or one
(
mypy_primer \
--repo mypy_to_test \
--new $GITHUB_SHA --old upstream_master \
--new $GITHUB_SHA --old base_commit \
--num-shards 3 --shard-index ${{ matrix.shard-index }} \
--debug \
--output concise \
Expand Down

0 comments on commit 578d389

Please sign in to comment.