You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when running the GitHub action on a pull request annotations are generated for the whole repo and PR is marked as failed due to errors elsewhere. The action should add annotations on a PR only - on files modified by the PR
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion!
I'm not quite sure if this is possible using the Github Action's regex parser (or problem matcher, as they call it), as we simply specify which part of flake8 output should be used for which part of the annotations. There is no configuration from which files the output should be used. It is searching through flake8's whole output and not acting on single files.
To keep this annotator universal, I'd suggest restricting flake8 to the files changed within the PR so that only the changed parts will be linted.
One way to achieve this is presented in this Medium article, the variables might have to be changed:
DIFF=$(git diff --name-only --diff-filter=b $(git merge-base HEAD $BRANCH))
flake8 $DIFF
when running the GitHub action on a pull request annotations are generated for the whole repo and PR is marked as failed due to errors elsewhere. The action should add annotations on a PR only - on files modified by the PR
The text was updated successfully, but these errors were encountered: