-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add an option to apply pre-commit and clang-tidy fixes #238
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/static_checks.yaml
Outdated
- name: Run pre-commit on all files | ||
run: pre-commit run --all --color always --verbose | ||
- name: Commit pre-commit fixes | ||
if: ${{contains(github.event.pull_request.labels.*.name, 'auto-fix') && failure()}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can check for the failure state of a specific step. This would also trigger, if, for example, the install dependencies step failed.
40022fa
to
d79a82b
Compare
2e7dbb9
to
369f112
Compare
b20cb49
to
b6ed0c0
Compare
b6ed0c0
to
72b183e
Compare
@@ -56,7 +56,10 @@ jobs: | |||
uses: thollander/actions-comment-pull-request@v2 | |||
with: | |||
message: | | |||
Deployed test documentation to https://exasim-project.com/NeoFOAM/Build_PR_${{ env.PR_NUMBER }} | |||
Thank you for your PR, here are some useful tips: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bot seems a bit spammy. Is there a way to only post once per PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should actually post it only once. I just deleted the comments of the bot to check how the most recent version renders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's removing the old comment and adding a new one. I still got multiple emails with the same bot comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this action should use the pull_request:open
event. That would probably mean to extract it into a new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok this should be resolved now with a999de0
i just check if the bot already posted.
0d1a162
to
d437b4d
Compare
Thank you for your PR, here are some useful tips:
|
This PR modifies the static-checks workflow to commit changes if the
auto-fix
label is set. For now, applying fixes automatically is not the default, because it might be annoying to constantly push and pull.Additional changes: