Skip to content

Commit 5f45c97

Browse files
committed
Dummy commit.
1 parent 97723a0 commit 5f45c97

1 file changed

Lines changed: 6 additions & 22 deletions

File tree

.github/workflows/hygiene.yml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,32 +29,16 @@ jobs:
2929
with:
3030
fetch-depth: 0
3131

32+
- name: Set up Python
33+
uses: actions/setup-python@v6.0.0
34+
with:
35+
python-version: "3.12"
36+
3237
- name: Install hygiene tooling
3338
run: |
34-
python3 -m pip install --user --no-cache-dir pre-commit==4.5.1 reuse==6.2.0
39+
python -m pip install --user --no-cache-dir pre-commit==4.5.1 reuse==6.2.0
3540
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
3641
37-
- name: Run pre-commit on changed files
38-
env:
39-
EVENT_NAME: ${{ github.event_name }}
40-
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
41-
PUSH_BEFORE_SHA: ${{ github.event.before }}
42-
run: |
43-
set -euo pipefail
44-
45-
base_ref=""
46-
if [[ "$EVENT_NAME" == "pull_request" ]]; then
47-
base_ref="$PR_BASE_SHA"
48-
elif [[ -n "${PUSH_BEFORE_SHA:-}" && "$PUSH_BEFORE_SHA" != "0000000000000000000000000000000000000000" ]]; then
49-
base_ref="$PUSH_BEFORE_SHA"
50-
fi
51-
52-
if [[ -n "$base_ref" ]] && git cat-file -e "${base_ref}^{commit}"; then
53-
pre-commit run --from-ref "$base_ref" --to-ref HEAD
54-
else
55-
echo "No base ref available; skipping changed-file pre-commit hooks."
56-
fi
57-
5842
- name: Run whole-repo whitespace check
5943
run: pre-commit run trailing-whitespace --all-files
6044

0 commit comments

Comments
 (0)