Skip to content

Commit 5a01ad6

Browse files
committed
Remove chmod pre-commit hook and use GitHub Action method again
Partially revert ce6d457 to keep the 644 permission checks and format commands.
1 parent ce6d457 commit 5a01ad6

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/workflows/format-command.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
- name: Commit to the PR branch if any changes
4040
run: |
4141
make format
42+
git ls-files -z | xargs -0 chmod 644
4243
if [[ $(git ls-files -m) ]]; then
4344
git config --global user.name 'actions-bot'
4445
git config --global user.email '[email protected]'

.github/workflows/style_checks.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
- name: Formatting check (ruff)
4141
run: make check
4242

43+
- name: Ensure files have 644 permission
44+
run: |
45+
git ls-files -z | xargs -0 chmod 644
46+
if [[ $(git ls-files -m) ]]; then git --no-pager diff HEAD; exit 1; fi
47+
4348
- name: Ensure example scripts have at least one code block separator
4449
run: |
4550
git ls-files 'examples/**/*.py' | xargs grep --files-without-match '# %%' > output.txt

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ repos:
1313
hooks:
1414
- id: forbid-crlf
1515
- id: remove-crlf
16-
- id: chmod
17-
args: ['644']
1816

1917
# https://pre-commit.ci/#configuration
2018
ci:

0 commit comments

Comments
 (0)