Skip to content

Commit

Permalink
cleanup and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilith Hafner authored and Lilith Hafner committed Oct 16, 2023
1 parent ce44b04 commit c2bc0ad
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
GH_TOKEN: "${{ github.token }}"
run: |
git fetch --depth=1 origin ${{ github.base_ref }}
OLD_FILES=$(git diff-index --name-only --diff-filter=ad FETCH_HEAD)
NEW_FILES=$(git diff-index --name-only --diff-filter=d FETCH_HEAD)
mkdir -p "${{ runner.temp }}/typos"
RELEASE_ASSET_URL="$(
gh api /repos/crate-ci/typos/releases/latest \
Expand All @@ -29,17 +32,11 @@ jobs:
--quiet --output-document=- "${RELEASE_ASSET_URL}" \
| tar -xz -C "${{ runner.temp }}/typos" ./typos
"${{ runner.temp }}/typos/typos" --version
echo z
OLD_FILES=$(git diff-index --name-only --diff-filter=ad FETCH_HEAD)
echo a
NEW_FILES=$(git diff-index --name-only --diff-filter=d FETCH_HEAD)
echo b
NEW_TYPOS=$(echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) || true
echo c
git checkout FETCH_HEAD -- $OLD_FILES
echo d
OLD_TYPOS=$(echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) || true
echo e
python -c '
import sys, json
existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]"))
Expand Down

0 comments on commit c2bc0ad

Please sign in to comment.