The best approach would be to create a PR with the formatted code. Useful references: https://github.com/marketplace/actions/create-pull-request https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/