+1, if it's not too big of a "lift" to get done I think it'd be great.

I've wondered before if "tidy" could be a "commit-hook", though the idea
probably isn't workable in practice due to tidy's ~30s runtime.  I like
your PR-level check idea much better.

On Fri, Mar 22, 2024 at 2:33 PM David Smiley <david.w.smi...@gmail.com>
wrote:

> Sometimes we make changes and forget to run tidy.  It's rather annoying.
>
> It occurred to me that our "precommit" GitHub PR action could be modified
> to first run tidy and to commit the changes (if any) beforehand, pushing to
> the source branch (generally on someone's fork).  Here's a blog post with
> examples on how to do this:
>
> https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/
> There are some caveats listed there... like a possible permissions issue.
> It seems there may be a solution --
> https://github.com/orgs/community/discussions/26865
> Also, the post recommends a "slash command" approach instead but I think
> that would just add an extra step; we know what the solution is every
> time.  And of course a contributor can do manual follow-up editing of the
> results when it doesn't flow nicely.  Ultimately it all gets squashed
> anyway.
>
> Any thoughts on this or an alternative?
>
> ~ David
>

Reply via email to