mirror of
https://github.com/astral-sh/ruff.git
synced 2025-12-23 09:19:39 +00:00
[ty] Add mypy primer check comparing same revisions (#21864)
This commit is contained in:
parent
2dd412c89a
commit
9ceec359a0
2 changed files with 57 additions and 2 deletions
|
|
@ -10,8 +10,10 @@ PRIMER_SELECTOR="$(paste -s -d'|' "${PRIMER_SELECTOR}")"
|
|||
echo "new commit"
|
||||
git rev-list --format=%s --max-count=1 "${GITHUB_SHA}"
|
||||
|
||||
MERGE_BASE="$(git merge-base "${GITHUB_SHA}" "origin/${GITHUB_BASE_REF}")"
|
||||
git checkout -b base_commit "${MERGE_BASE}"
|
||||
if [ -z "${BASE_REVISION:-}" ]; then
|
||||
BASE_REVISION="$(git merge-base "${GITHUB_SHA}" "origin/${GITHUB_BASE_REF}")"
|
||||
fi
|
||||
git checkout -b base_commit "${BASE_REVISION}"
|
||||
echo "base commit"
|
||||
git rev-list --format=%s --max-count=1 base_commit
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue