-
Notifications
You must be signed in to change notification settings - Fork 38
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
[feat] add trunk fmt pre-push hook #801
base: main
Are you sure you want to change the base?
Conversation
⏱️ 4m total CI duration on this PR
|
Hi @Ryang20718, thanks for the PR! I think that this action will not work as intended, however. For a
Let me know what you think, it's possible that there's also another option to smooth out your workflow; what formatter is usually the slowest to complete? |
fa9aee7
to
1bb9695
Compare
104b91c
to
318579d
Compare
@TylerJang27 ready for a re-review! |
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.
Can you add a comment explaining this action, since it's a slight departure from idiomatic usage?
@@ -18,6 +18,15 @@ actions: | |||
- git_hooks: [pre-commit] | |||
notify_on_error: false | |||
|
|||
- id: trunk-fmt-pre-push |
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.
- id: trunk-fmt-pre-push | |
# We recommend using trunk-fmt-pre-commit in most cases, since it is | |
# generally pretty fast and modifies the index. When running this action | |
# via pre-push, note that it only reports unformatted files and doesn't modify | |
# them or modify the index. You may wish to use this action if you have a | |
# setup where formatters are too slow for pre-commit. | |
- id: trunk-fmt-pre-push |
A user may have multiple commits they want to add in series. whilst trunk fmt is fast, it may not be instantaneous. would be nice to have an option to run prepush