-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
It is possible to run the action on only those files that have changes in the PR via:
- uses: actions/checkout@v2
with:
fetch-depth: -1
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- id: find_changed_files
run: echo ::set-output name=changed_files::$(git diff --name-only ${{github.sha}} ${{github.event.pull_request.base.sha}} | tr ' ' '\n' | grep .py | tr '\n' ' ')
- uses: TrueBrain/actions-flake8@v2
with:
plugins: flake8-docstrings dlint flake8-bugbear flake8-simplify flake8-debugger flake8-print flake8-pep3101
only_warn: 1
extra_arguments: "${{steps.find_changed_files.outputs.changed_files}}"It would be nice if this was supported directly (although, just documenting would be good also). Also it would be nice if warnings could be shown only for changed files while errors are shown for all files. One simple way of doing so is to run flake8 twice, a much more difficult way of getting this done is to skip the changed files in the regex.
r-ichard and xylar
Metadata
Metadata
Assignees
Labels
No labels