kou commented on issue #47937:
URL: https://github.com/apache/arrow/issues/47937#issuecomment-3459301461
How about implementing auto-fix GitHub Actions for new contributors so that
they don't need to run pre-commit on local?
I think that something like the following will work:
```yaml
name: Autofix
on:
push:
permissions:
contents: write
jobs:
process:
name: Process
if: >-
github.repository != 'apache/arrow' &&
github.ref_name != 'main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #
v5.0.0
# Prepare pre-commit
- name: Run pre-commit
run: |
pre-commit run --all-files --color=always --show-diff-on-failure
- name: Push
run: |
if [ "$(git status --porcelain)" != "" ]; then
git add --all
git commit -m "Autofix"
git push
fi
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]