Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test autofix action. #4

Closed
wants to merge 17 commits into from
15 changes: 10 additions & 5 deletions .github/workflows/fix-style.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
name: "Fix Style"
on:
issue_comment:
types: [created]
#issue_comment:
# types: [created]
push:

jobs:
fix-style:
if: github.event.issue.pull_request && startsWith(github.event.comment.body, 'fix style')
#if: github.event.issue.pull_request && startsWith(github.event.comment.body, 'fix style')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Copy link
Owner Author

@bdice bdice Sep 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: flake8 breaks on Cython code if we use Python 3.10 because of changes in the parser. I think we may need to update flake8 and add the flake8-force plugin to fix this? https://github.com/kmaehashi/flake8-force

- run: python -m pip install pre-commit
- run: pre-commit run --all-files --show-diff-on-failure --color=always
- uses: EndBug/add-and-commit@v9
if: ${{ failure() }}
with:
fetch: false
message: "Style fix."
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ repos:
- cmakelang==0.6.13
verbose: true
require_serial: true
- id: copyright-check
name: copyright-check
# This hook's use of Git tools appears to conflict with
# existing CI invocations so we don't invoke it during CI runs.
stages: [commit]
entry: python ./ci/checks/copyright.py --git-modified-only
language: python
# - id: copyright-check
# name: copyright-check
# # This hook's use of Git tools appears to conflict with
# # existing CI invocations so we don't invoke it during CI runs.
# stages: [commit]
# entry: python ./ci/checks/copyright.py --git-modified-only
# language: python
- id: doxygen-check
name: doxygen-check
entry: ./ci/checks/doxygen.sh
Expand Down